cparsons | 37fbbf3 | 2018-11-21 15:13:24 -0800 | [diff] [blame] | 1 | // 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 | |
| 15 | package com.google.devtools.build.skydoc; |
| 16 | |
| 17 | import com.google.devtools.common.options.Option; |
| 18 | import com.google.devtools.common.options.OptionDocumentationCategory; |
| 19 | import com.google.devtools.common.options.OptionEffectTag; |
| 20 | import com.google.devtools.common.options.OptionsBase; |
| 21 | import java.util.List; |
| 22 | |
| 23 | /** Contains options for running {@link SkydocMain}. */ |
| 24 | public 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( |
cparsons | 453c1e8 | 2019-03-19 11:13:22 -0700 | [diff] [blame] | 35 | 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( |
cparsons | 37fbbf3 | 2018-11-21 15:13:24 -0800 | [diff] [blame] | 43 | 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, |
Googler | ea0c110 | 2020-03-27 09:30:59 -0700 | [diff] [blame] | 53 | defaultValue = "null", |
cparsons | 37fbbf3 | 2018-11-21 15:13:24 -0800 | [diff] [blame] | 54 | documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, |
| 55 | effectTags = OptionEffectTag.UNKNOWN, |
cparsons | 7e366fd | 2019-06-17 13:26:40 -0700 | [diff] [blame] | 56 | 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.") |
cparsons | 37fbbf3 | 2018-11-21 15:13:24 -0800 | [diff] [blame] | 61 | public List<String> symbolNames; |
cparsons | 436b031 | 2019-02-11 14:38:26 -0800 | [diff] [blame] | 62 | |
| 63 | @Option( |
| 64 | name = "dep_roots", |
| 65 | allowMultiple = true, |
Googler | ea0c110 | 2020-03-27 09:30:59 -0700 | [diff] [blame] | 66 | defaultValue = "null", |
cparsons | 436b031 | 2019-02-11 14:38:26 -0800 | [diff] [blame] | 67 | documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, |
| 68 | effectTags = OptionEffectTag.UNKNOWN, |
| 69 | help = "File path roots to search when resolving transitive bzl dependencies") |
| 70 | public List<String> depRoots; |
cparsons | 37fbbf3 | 2018-11-21 15:13:24 -0800 | [diff] [blame] | 71 | } |