Skip to content

CLI-02: Read a single human finding with line:col

A file that breaks its contract prints one human-formatted finding with id, level, and source line.

Builds on: CLI-01: Validate one clean file, see exit 0

A terminal session: the command as you’d run it, followed by the output it prints; trailing comments note the exit status.

Terminal window
# one doc is missing a required section; read the human-formatted finding with its source line
markdown-contract validate ./decisions --contract decisions.contract.yaml
Scanned 1 file; 1 matched, 0 unmatched
D-9001.md:8 error structure/section-missing required section ‘Decision’ is missing
1 finding(s): 1 error, 0 warn, 0 report
# exit status: 1 (error-level findings)
  • formatHuman per-finding line (path:line level id — message)
  • Finding {id,level,path,pos}
  • exit code 1 (error-level findings)