Documentation
¶
Overview ¶
Command gencheckdocs renders the canonical check catalog to docs/checks.md by introspecting the global core registry.
Run:
go run ./cmd/gencheckdocs # writes docs/checks.md go run ./cmd/gencheckdocs -check # diff against on-disk, exit 1 if stale go run ./cmd/gencheckdocs -out=foo.md # write somewhere else
The -check mode is what CI runs: 'make docs-check' fails the build when the committed catalog drifts from the registry, so a new check or a tweaked Title cannot land without the docs being regenerated in the same PR.
Why a separate tool rather than a //go:generate sitting inside internal/cli? Two reasons. First, the generator must import every check package for its init() side-effects, and dragging that import graph into a unit test or another command pollutes the binary. Second, the registry is intentionally process-global: this is the one place we can rely on it being fully populated without inventing a sentinel.