console.log in a bootstrap script, a long function that reads better unsplit, an any at a genuinely untyped boundary. Inline suppressions let you silence a specific finding on a specific line without turning the whole rule off - and force whoever does it to write down why.
Suppressions are a free feature. The two team-control config fields are Pro.
Syntax
Place aniris-ignore comment on the line directly above the finding you want to suppress:
# comments:
iris-ignore-file anywhere in the file:
- One or more rule ids, comma-separated.
- A
--separator followed by a reason. The reason is required, not decorative.
The reason is required
A directive that is missing its reason, names an unknown rule id, or names no rule at all suppresses nothing. Instead, it is reported as a Bare Ignore finding with its own health-score penalty (healthScoreWeights.bareSuppression, default 2). This keeps the mechanism honest: a suppression is a documented decision, not a mute button.
What can be suppressed
Eighteen rule ids are suppressible - every finding that carries a line position:| Rule id | Finding |
|---|---|
console-log | Console / debug print statement |
todo | TODO / FIXME / HACK comment |
magic-number | Raw numeric literal |
long-param-list | Long parameter list |
unused-var | Unused variable |
unused-function | Unused function |
hardcoded-secret | Hardcoded credential |
eval-usage | eval() / exec() call |
sql-concatenation | SQL built by string concatenation |
insecure-random | Non-cryptographic RNG |
unsafe-regex | ReDoS-prone regex |
hardcoded-localhost | Hardcoded localhost URL |
disabled-tls-verification | TLS verification disabled |
debug-flags-enabled | Debug flag in production code |
weak-hashing | MD5 / SHA-1 hashing |
open-redirect | Unvalidated redirect |
any-usage | Explicit any type (TS/JS) |
function-too-long | Function over the length threshold |
Effect on the health score
Suppressed findings stop costing health-score points - the score is recomputed after suppressions are applied. They are never silently invisible, though: every suppressed finding stays counted and inspectable in the sidebar and CLI output. A bare ignore works the other way: it suppresses nothing and deducts points (default2 per bare directive, tunable via Scoring Weights).
Where suppressions surface
File tab - a collapsible Suppressed section below Code Smells lists each suppressed finding with its rule, line, and reason. Bare ignores appear as a “Bare Ignores” smell row. Workspace and Folder tabs - a Suppressions section shows the suppressed and bare-ignore counts plus the top files by suppression count. The See all button opens a full table of every suppression in the last scan, filterable by rule and text, with click-to-open at the exact line. CLI -iris check and iris gate always print the suppressed count. Add --show-suppressed to list each suppressed finding with its reason:
--format json) include a per-file suppressed array carrying the rule id, line, and reason for each suppression.
Team controls (Pro)
Two.irisconfig.json fields let team leads keep suppressions in check:
| Key | What it controls |
|---|---|
gateMaxSuppressions | Per-file cap on suppressions. A file with more iris-ignore directives than this fails the gate - enforced by iris gate, the git pre-push hook, and the build hook. |
ignoreSuppressions | Kill-switch. Set to true and every iris-ignore directive becomes inert: suppressed findings count as live again, everywhere. Useful for audits or when suppressions are being used to dodge the gate rather than document exceptions. |
strict and security presets ship with a default cap (gateMaxSuppressions: 5 and 3 per file) and a raised bareSuppression penalty (3 and 4). The other presets leave the cap unset, so there is no suppression limit until you configure one.