android13/external/stardoc/docs/stardoc_rule.md

3.9 KiB

stardoc

stardoc(name, aspect_template, deps, format, func_template, header_template, input, out,
        provider_template, renderer, rule_template, semantic_flags, stardoc, symbol_names)

Generates documentation for exported skylark rule definitions in a target starlark file.

This rule is an experimental replacement for the existing skylark_doc rule.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
aspect_template The input file template for generating documentation of aspects. Label optional //stardoc:templates/markdown_tables/aspect.vm
deps A list of skylark_library dependencies which the input depends on. List of labels optional []
format The format of the output file. Valid values: 'markdown' or 'proto'. String optional "markdown"
func_template The input file template for generating documentation of functions. Label optional //stardoc:templates/markdown_tables/func.vm
header_template The input file template for the header of the output documentation. Label optional //stardoc:templates/markdown_tables/header.vm
input The starlark file to generate documentation for. Label optional None
out The (markdown) file to which documentation will be output. Label required
provider_template The input file template for generating documentation of providers. Label optional //stardoc:templates/markdown_tables/provider.vm
renderer The location of the renderer tool. Label optional //stardoc:renderer
rule_template The input file template for generating documentation of rules. Label optional //stardoc:templates/markdown_tables/rule.vm
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.

For example, if //foo:bar.bzl does not build except when a user would specify --incompatible_foo_semantic=false, then this attribute should contain "--incompatible_foo_semantic=false".
List of strings optional []
stardoc The location of the stardoc tool. Label optional //stardoc:stardoc
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 []