Documentation
¶
Overview ¶
Command docscheck keeps the Markdown docs from rotting. Run from the repository root (make docs-check), it checks every Markdown file Git knows of, tracked or untracked but not ignored, outside test data:
- internal links: the file exists, and an #anchor names a heading (by GitHub's slug rules, duplicates numbered -1, -2, ...) or an HTML id/name in the doc it points to; full reference links have a definition;
- the ## Contents section, in docs that have one: it lists every ## section, and only ## and ### sections, in order;
- the docs index (-index, docs/README.md), if it exists: it links to every doc.
-contents-min-lines and -require-index make the last two strict: every doc over that many lines needs a Contents section, and the index must exist. With -external it also checks the http(s) links, with retries; hosts that fail for reasons other than a broken link are listed in -external-ignore.
Problems are printed one per line as file:line: message; the exit status is 1 if there are any, 2 if the check could not run.