Suppress a finding

A suppression is a comment on the line before the code. It needs a reason and can carry an expiry date.

All docs pages

Run tx0 suppress ID --reason "..." with the id of the finding. It writes the comment in the syntax of the file and checks that it suppresses only that finding. --until YYYY-MM-DD adds an expiry date.

$ tx0 suppress WQ9WMD91C --reason "kept to test the compiler" --until 2027-03-01

The comment looks like this, here in Go:

api/order_test.go
// tx0: ignore[tx0/go:identical-operands] reason="kept to test the compiler" until=2027-03-01
if x <= x {

tx0 reports a suppression that has expired or no longer matches anything, so a suppression does not outlive its reason. The summary line of tx0 check says how many findings were suppressed.

To leave a rule out for whole paths, such as tests, use [[overrides]] in tx0.toml instead.