blob: d1635be24667796a372a78960845736e709a72c0 [file] [log] [blame]
cparsons37fbbf32018-11-21 15:13:24 -08001// Copyright 2018 The Bazel Authors. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package com.google.devtools.build.skydoc;
16
17import com.google.devtools.common.options.Option;
18import com.google.devtools.common.options.OptionDocumentationCategory;
19import com.google.devtools.common.options.OptionEffectTag;
20import com.google.devtools.common.options.OptionsBase;
21import java.util.List;
22
23/** Contains options for running {@link SkydocMain}. */
24public class SkydocOptions extends OptionsBase {
25
26 @Option(
27 name = "input",
28 defaultValue = "",
29 documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
30 effectTags = OptionEffectTag.UNKNOWN,
31 help = "The label of the target file for which to generate documentation")
32 public String targetFileLabel;
33
34 @Option(
cparsons453c1e82019-03-19 11:13:22 -070035 name = "workspace_name",
36 defaultValue = "",
37 documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
38 effectTags = OptionEffectTag.UNKNOWN,
39 help = "The name of the workspace in which the input file resides")
40 public String workspaceName;
41
42 @Option(
cparsons37fbbf32018-11-21 15:13:24 -080043 name = "output",
44 defaultValue = "",
45 documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
46 effectTags = OptionEffectTag.UNKNOWN,
47 help = "The path of the file to output documentation into")
48 public String outputFilePath;
49
50 @Option(
51 name = "symbols",
52 allowMultiple = true,
Googlerea0c1102020-03-27 09:30:59 -070053 defaultValue = "null",
cparsons37fbbf32018-11-21 15:13:24 -080054 documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
55 effectTags = OptionEffectTag.UNKNOWN,
cparsons7e366fd2019-06-17 13:26:40 -070056 help =
57 "A list of symbol names to generate documentation for. These should correspond to the"
58 + " names of rule, provider, or function definitions in the input file. If this list"
59 + " is empty, then documentation for all exported rule definitions will be"
60 + " generated.")
cparsons37fbbf32018-11-21 15:13:24 -080061 public List<String> symbolNames;
cparsons436b0312019-02-11 14:38:26 -080062
63 @Option(
64 name = "dep_roots",
65 allowMultiple = true,
Googlerea0c1102020-03-27 09:30:59 -070066 defaultValue = "null",
cparsons436b0312019-02-11 14:38:26 -080067 documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
68 effectTags = OptionEffectTag.UNKNOWN,
69 help = "File path roots to search when resolving transitive bzl dependencies")
70 public List<String> depRoots;
cparsons37fbbf32018-11-21 15:13:24 -080071}