Documentation
¶
Overview ¶
Command coveragegate implements the coverage ratchet: it parses Go and web coverage profiles, aggregates them into the scopes listed in `scopes` below, and compares each scope's current statement coverage against coverage/ratchet.json.
Ratchet rule: coverage/ratchet.json holds a per-scope "min" — the floor currently enforced by `make check` — and a "floor" — the target (95% security-critical, 80% general). "min" is RAISED toward "floor" as tests are added; a scope is "done" when min == floor. Minimums may only ever increase, never decrease — enforced by tools/ratchetguard (`make ratchet-guard`), not by this tool, to keep the gate itself simple and dependency-free.
Two modes:
- "gate": exit 1 if any scope's current coverage is below its ratchet min (used by `make check`'s coverage-gate target).
- "report": always exits 0; prints the same table plus a gap-to-floor column (used by `make coverage-report`).
Click to show internal directories.
Click to hide internal directories.