Skip to content

Commit 678bead

Browse files
committed
docs(coverage): say the CRAP gate has no waiver label
The changed-line gate honours the coverage-waiver PR label; this one has no equivalent, and a reader who assumes otherwise loses an hour to a label that does nothing.
1 parent 2f0670a commit 678bead

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎CONTRIBUTING.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,12 @@ fails when it cannot score them. It prints `no trustworthy verdict` and names th
252252
or when a touched function postdates the map and would be scored from complexity alone. Every one of
253253
those is a stale coverage run, not a debt you owe: re-run `pnpm test:coverage` on the commit and
254254
re-check. What does count as debt is editing a function that already scores 30 or more — the score
255-
does not have to be new. Moving a file without editing its lines touches none of its functions.
255+
does not have to be new. Moving a file without editing its lines touches none of its functions, and
256+
neither does deleting lines from one: removing code retires debt instead of adding it, which is also
257+
why deleting a whole function passes. A deletion that leaves an untested complex function standing is
258+
not charged, and that function keeps showing in the `--all` backlog. Unlike the changed-line gate,
259+
this one has no `coverage-waiver` label: the only way past a score is to test or simplify the
260+
function, or to exempt the file in `fallow-crap.json`.
256261

257262
Two things are listed rather than blocked, so a green run does not mean they were checked. A touched
258263
function in a file coverage never instrumented — one `coverage.exclude` drops, or one a stale local

0 commit comments

Comments
 (0)