Expand description
Output shared by the commands that report findings.
check and lint-docs print the same two things in the same way: a
finding line, and the “could not be analyzed” block that carries the exit-2
contract. They were transcribed copies, so lint-docs inherited a fixed
bug by luck rather than by construction: the blank line above the failure
block is emitted only when a findings block precedes it, because emitting it
unconditionally opened every clean-but-unanalyzed run with a stray empty
line.
What each command still owns is its own format’s shape - check‘s JSON
wire types, lint-docs’ report-only footer - and the one deliberate
difference in the finding line, which is passed as an argument rather than
copied.
Functions§
- finding_
line - One line of text output for a finding.
- write_
failures - The “N file(s) could not be analyzed” block.
- write_
suggestion - The suggestion line that follows a finding, when it has one.