xref: /aosp_15_r20/external/stardoc/docs/stardoc_rule.md (revision b2fa42943c124aa9c7163734493fc7a7559681cf)
1*b2fa4294SXin Li<!-- Generated with Stardoc: http://skydoc.bazel.build -->
2*b2fa4294SXin Li
3*b2fa4294SXin LiStarlark rule for stardoc: a documentation generator tool written in Java.
4*b2fa4294SXin Li
5*b2fa4294SXin Li<a id="stardoc"></a>
6*b2fa4294SXin Li
7*b2fa4294SXin Li## stardoc
8*b2fa4294SXin Li
9*b2fa4294SXin Li<pre>
10*b2fa4294SXin Listardoc(<a href="#stardoc-name">name</a>, <a href="#stardoc-aspect_template">aspect_template</a>, <a href="#stardoc-deps">deps</a>, <a href="#stardoc-format">format</a>, <a href="#stardoc-func_template">func_template</a>, <a href="#stardoc-header_template">header_template</a>, <a href="#stardoc-input">input</a>, <a href="#stardoc-out">out</a>,
11*b2fa4294SXin Li        <a href="#stardoc-provider_template">provider_template</a>, <a href="#stardoc-renderer">renderer</a>, <a href="#stardoc-rule_template">rule_template</a>, <a href="#stardoc-semantic_flags">semantic_flags</a>, <a href="#stardoc-stardoc">stardoc</a>, <a href="#stardoc-symbol_names">symbol_names</a>)
12*b2fa4294SXin Li</pre>
13*b2fa4294SXin Li
14*b2fa4294SXin Li
15*b2fa4294SXin LiGenerates documentation for exported skylark rule definitions in a target starlark file.
16*b2fa4294SXin Li
17*b2fa4294SXin LiThis rule is an experimental replacement for the existing skylark_doc rule.
18*b2fa4294SXin Li
19*b2fa4294SXin Li
20*b2fa4294SXin Li**ATTRIBUTES**
21*b2fa4294SXin Li
22*b2fa4294SXin Li
23*b2fa4294SXin Li| Name  | Description | Type | Mandatory | Default |
24*b2fa4294SXin Li| :------------- | :------------- | :------------- | :------------- | :------------- |
25*b2fa4294SXin Li| <a id="stardoc-name"></a>name |  A unique name for this target.   | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required |  |
26*b2fa4294SXin Li| <a id="stardoc-aspect_template"></a>aspect_template |  The input file template for generating documentation of aspects.   | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>//stardoc:templates/markdown_tables/aspect.vm</code> |
27*b2fa4294SXin Li| <a id="stardoc-deps"></a>deps |  A list of bzl_library dependencies which the input depends on.   | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> |
28*b2fa4294SXin Li| <a id="stardoc-format"></a>format |  The format of the output file. Valid values: 'markdown' or 'proto'.   | String | optional | <code>"markdown"</code> |
29*b2fa4294SXin Li| <a id="stardoc-func_template"></a>func_template |  The input file template for generating documentation of functions.   | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>//stardoc:templates/markdown_tables/func.vm</code> |
30*b2fa4294SXin Li| <a id="stardoc-header_template"></a>header_template |  The input file template for the header of the output documentation.   | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>//stardoc:templates/markdown_tables/header.vm</code> |
31*b2fa4294SXin Li| <a id="stardoc-input"></a>input |  The starlark file to generate documentation for.   | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>None</code> |
32*b2fa4294SXin Li| <a id="stardoc-out"></a>out |  The (markdown) file to which documentation will be output.   | <a href="https://bazel.build/concepts/labels">Label</a> | required |  |
33*b2fa4294SXin Li| <a id="stardoc-provider_template"></a>provider_template |  The input file template for generating documentation of providers.   | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>//stardoc:templates/markdown_tables/provider.vm</code> |
34*b2fa4294SXin Li| <a id="stardoc-renderer"></a>renderer |  The location of the renderer tool.   | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>//stardoc:renderer</code> |
35*b2fa4294SXin Li| <a id="stardoc-rule_template"></a>rule_template |  The input file template for generating documentation of rules.   | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>//stardoc:templates/markdown_tables/rule.vm</code> |
36*b2fa4294SXin Li| <a id="stardoc-semantic_flags"></a>semantic_flags |  A list of canonical flags to affect Starlark semantics for the Starlark interpretter during documentation generation. This should only be used to maintain compatibility with non-default semantic flags required to use the given Starlark symbols.<br><br>For example, if <code>//foo:bar.bzl</code> does not build except when a user would specify <code>--incompatible_foo_semantic=false</code>, then this attribute should contain "--incompatible_foo_semantic=false".   | List of strings | optional | <code>[]</code> |
37*b2fa4294SXin Li| <a id="stardoc-stardoc"></a>stardoc |  The location of the stardoc tool.   | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>//stardoc:stardoc</code> |
38*b2fa4294SXin Li| <a id="stardoc-symbol_names"></a>symbol_names |  A list of symbol names to generate documentation for. These should correspond to the names of rule definitions in the input file. If this list is empty, then documentation for all exported rule definitions will be generated.   | List of strings | optional | <code>[]</code> |
39*b2fa4294SXin Li
40*b2fa4294SXin Li
41