Render documentation for provider `init` callbacks (#224)

By default, we want the following behavior:

* Custom init callback specified
  * The set of parameters for the init callback equals the set of
    fields for the provider; and the docs for the init callback's
    parameters are either empty or equal to corresponding field docs
    * Some init parameters have a default value:
      -> Render a single "Fields" table with 3 columns (name, doc,
         default value)
    * ... otherwise
      -> Render a single "Fields" table with 2 columns
  * ... otherwise
    -> Render two tables - "Constructor parameters" and "Fields" - with
       the links from the summary blurb (interfixed with "_init")
       leading to the parameters table (not the fields table)
* ... otherwise
  -> Trivial case - single "Fields" table (as before).

Fixes #182
12 files changed
tree: d3bb0f4aa3ecf3a1843a318c1a5622d1c002191b
  1. .bazelci/
  2. distro/
  3. docs/
  4. src/
  5. stardoc/
  6. test/
  7. .bazelignore
  8. .bazelrc
  9. .gitignore
  10. AUTHORS
  11. BUILD
  12. CHANGELOG.md
  13. CODEOWNERS
  14. CONTRIBUTING.md
  15. CONTRIBUTORS
  16. deps.bzl
  17. LICENSE
  18. maven_install.json
  19. MODULE.bazel
  20. README.md
  21. rules_jvm_external.patch
  22. setup.bzl
  23. update-release-binary.sh
  24. update-stardoc-docs.sh
  25. update-stardoc-tests.sh
  26. version.bzl
  27. WORKSPACE
  28. WORKSPACE.bzlmod
README.md

Stardoc - Starlark Documentation Generator

Build status

Stardoc is a documentation generator for Bazel build rules written in Starlark.

Stardoc provides a Starlark rule (stardoc, see documentation) that can be used to build documentation for Starlark rules in Markdown. Stardoc generates one documentation page per .bzlfile.

Get Started

About Stardoc

Project Status

Skydoc deprecation

Stardoc is a replacement for the deprecated “Skydoc” documentation generator.

See Skydoc Deprecation for details on the deprecation and migration details.

Future plans

See our future plans for refactoring Stardoc to be more consistent with how Bazel evaluates .bzl files, and what it means for maintenance of this project.

Maintainer's guide

See the maintaner's guide for instructions for cutting a new release.