A cofferdam-ignore suppression directive names a check ID but no current finding for that check exists in the scope the directive covers. The underlying issue was likely fixed, the code was deleted, or the check was renamed — the directive is now dead weight.
Three forms are checked:
- Next-line —
// cofferdam-ignore: <CheckId>[: reason]where the next non-blank line has no matching finding. - Range —
// cofferdam-ignore-start: <CheckId>…// cofferdam-ignore-endwhere the covered lines have no matching finding. - File-wide —
// cofferdam-ignore-file: <CheckId>where the file has no matching finding anywhere.
Broad-form directives (no check id, e.g. // cofferdam-ignore) are not flagged here — that's Consistency.BroadSuppression's territory. Directives targeting a check ID not installed in the current engine run are also skipped — those are Consistency.UnknownCheckId's territory.
Stale (flag):
// cofferdam-ignore: Warning.TripleEquals: legacy comparator
const x = 1 + 1; // no == / != here — suppression is staleStale range (flag):
// cofferdam-ignore-start: Refactor.CyclomaticComplexity
function simple() {
return 42;
}
// cofferdam-ignore-endStill valid (no finding):
// cofferdam-ignore: Warning.TripleEquals: intentional loose comparison
if (value == null) { /* ... */ }Remove stale directives to keep the suppression list auditable and reviewable. A suppression with no finding is noise that erodes trust in suppressions that are still load-bearing.