Writing one
Put the comment on the line directly above the code it applies to:#:
iris-ignore-file anywhere in it:
--, then a reason.
A reason is required
If you leave out the reason, misspell the rule id or name no rule at all, the comment suppresses nothing. Instead it is reported as a Bare Ignore, which costs points of its own.any was thought through or simply inconvenient. Penalising an unexplained one keeps suppressions meaningful.
What you can suppress
Every finding that points at a specific line can be suppressed. These are the 30 code-finding rules; the nine verification integrity rules are covered further down:
Findings about a whole file rather than a line cannot be suppressed: file too long, too many functions, too many imports, and parse errors (files Iris Code could not read). Those always count.
What it does to your score
A suppressed finding stops costing points, because the score is worked out after suppressions are applied. It does not disappear, though. It stays counted and listed in the sidebar and in the CLI output, so a project that keeps adding suppressions can see it happening. A bare ignore does the opposite: it suppresses nothing and takes points off, 2 by default. You can change that in Scoring Weights.Where you see them
File tab has a collapsible Suppressed section under Code Smells, with each rule, line and reason. Bare ignores show up as their own smell row. Workspace and Folder tabs show how many suppressions and bare ignores there are, and the files with the most. See all opens the full table for the last scan, which you can filter and click to open each file. The CLI (theiris terminal commands) always prints the count. --show-suppressed lists them:
--format json includes a per-file suppressed array with the rule, line and reason.
Limiting suppressions (Pro)
Two settings in.irisconfig.json control how far suppressions can go:
The
strict and security presets already set a limit (5 and 3 per file) and a heavier bare-ignore penalty (3 and 4 points). The other presets leave it unset, so there is no limit until you set one.
Verification integrity allowances
Verification integrity reports changes that weaken your checks, such as a deleted test. Its rule IDs aretest-removed, test-disabled, assertions-weakened, checker-silenced, type-widened, error-swallowed, iris-suppressed, rules-loosened and code-packed.
For these rules, the iris-ignore comment can sit at the end of the line itself or in a block comment, as well as on the line above. Text inside a string is never treated as a suppression.
A suppression for an integrity finding needs a reason. The finding stays visible, marked as allowed, and the new suppression comment is itself reported as a warning. An agent should restore the check or explain a deliberate change to you, rather than quietly add a way around it.
A deleted file has no line left to put a comment on. For hooks and CI, add a line to the commit message instead:
#<test name> to limit a test allowance to one named test.
code-packed applies to a whole file and does not accept the # part. Use This is intended in the editor, or Iris-Allow: code-packed src/view.ts -- reviewed compact layout for hooks and CI.
A line naming an unknown rule, a path outside the repository or no reason does not allow anything. See verification integrity.