feat(doc): fail the check on a missing doc comment #384
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/317-doc-check-fails-on-missing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #317
What
A public construct that the standard asks a doc comment of and that has none is now a problem of
torb doc --check, like a broken link: one line per construct (file:line: Type.member has no doc comment), sorted with the other problems, counted in the closingN problems, exit code 1. The separateN of M ... have no doc commentsummary andreportMissingare dropped. The tier A gatedoc --check --no-run stdintools/gates.shtherefore enforces the rule; no new gate.compiler/src/reference/model.trb:Reference.undocumentedLinesbecomesmissingDocumentationProblems(aDocumentationProblemper construct).compiler/src/reference/command.trb:runDocadds them to the problems; usage text and module comment updated.compiler/tests/reference.test.trb: an undocumented required field fails with file and line, a fully documented package has no problem, and the member of anextend ... with Traitwithout a doc comment passes.docs/tooling/torb-doc.md("Missing doc comments", help text, example output), its copy inskills/,compiler/CONTRIBUTING.md, thetools/gates.shcomments anddocs/ROADMAP.md(the strict check moves from open work to built, 2026-10-19).No syntax, native, driver flag or looked-up std name changes, so the seed is untouched and uses no new language feature.
Test
Not run locally (no bootstrap or gates outside CI, orion/infra#947). Forge CI of this PR runs
sh tools/gates.sh a, includingdoc --check --no-run std(must report 0 missing onmain, #316 reported 0),docs skill --check,docs check docsandformat --check.tools/check-commits.sh origin/main HEADis clean.c4693dee027b63923ad57b63923ad5381e6b507b381e6b507b482c0b97a4482c0b97a441b6874e60Approved at
41b6874.compiler/tests/reference.test.trbcover an undocumented required field (file, line, construct), a fully documented package, and theextend ... with Traitmember that is not required. CI is green for this head, including tier A (doc --check --no-run std), tier B, pdisc and gates.missingDocumentationProblemsfeedsrunDoc's problem list, which is sorted and counted in the closingN problems(exit 1).reportMissingis removed together with its now-unused import.torb-doc.mdand itsskills/copy,CONTRIBUTING.md, thegates.shcomments and ROADMAP are updated, and the pdisc sidecar hash/date match.torb doc --checkfail on a public construct without a doc comment #317torb doc --checkfail on a public construct without a doc comment #317torb doc --checkfail on a public construct without a doc comment #317