Skip to content

docscheck

Stop your documentation telling people to run commands that do not exist. Take the command tree from your running program, read the fenced examples in your docs, and fail the build when one names a command the tool cannot run.

go get gitlab.com/phpboyscout/go/docscheck

Documentation drifts from a CLI silently. Split a command into a group and every page using the old form starts instructing readers to run something that errors — and nothing notices, because no test compares the two.

What it flags

One shape, and only one: inside a fenced code block, a command group followed by a concrete token that is not one of its subcommands.

Example Verdict
krites reset IMG_2043.CR2 findingreset is a group; IMG_2043.CR2 is not a subcommand
krites reset frame IMG_2043.CR2 fine — resolves to a leaf
krites reset fine — a bare group is a synopsis
krites xmp <subcommand> fine — a placeholder is a synopsis
krites config --help fine — a flag is not a subcommand

Why so narrow is the interesting part — see Why only fenced blocks.

Where to go next