Build Rule Reference
Skydoc

Build Rule Reference

stardoc

stardoc(name, deps, input, out, 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 Name; required

A unique name for this target.

deps List of labels; optional

A list of skylark_library dependencies which the input depends on.

input Label; optional

The starlark file to generate documentation for.

out Label; required

The (markdown) file to which documentation will be output.

semantic_flags List of strings; optional

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".

stardoc Label; optional

The location of the stardoc tool.

symbol_names List of strings; optional

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.

stardocimpl

_stardoc_impl(ctx)

Implementation of the stardoc rule.

Parameters