healthScoreWeights you can change exactly how much each finding type dents the base 100 score, so the health metric reflects what matters most to your team.
Custom scoring weights require Iris Pro. Set the
healthScoreWeights key in .irisconfig.json or configure it visually in Config Studio under Custom Scoring.Default weights
These are the values every preset starts from. Omitting a key falls back to the active preset’s default for that finding type, or the global defaults below if no preset is set.| Key | Default | What it penalises |
|---|---|---|
hardcodedSecret | 10 | Per hardcoded secret found — largest single deduction |
errorWarning | 5 | Per error-severity structural warning |
warningWarning | 3 | Per warning-severity structural warning |
tsIgnore | 3 | Per @ts-ignore comment (TS/JS only) |
anyUsage | 2 | Per explicit any type (TS/JS only) |
deepNesting | 2 | Multiplier applied to deep nesting score per function |
unusedFunction | 2 | Per unused function definition |
consoleLog | 1 | Per console/debug print statement |
longParamList | 1 | Per long parameter list finding |
unusedVar | 1 | Per unused variable |
When to customise weights
- Your team ships to a regulated environment and wants secrets to cost twice the default — set
"hardcodedSecret": 18. - Your codebase is a prototype and left-in console logs are not a blocker — set
"consoleLog": 0. - TypeScript safety is the team’s top concern — bump
anyUsageandtsIgnoreabove their preset values. - You want the health score to reflect only the findings you actually act on — zero out the noise.
Security-focused example
Amplify the secrets penalty and make console logs carry more weight for audit-ready code:.irisconfig.json
Softening noise for a legacy codebase
Zero out findings your team has accepted as-is so the health score reflects only what you plan to fix:.irisconfig.json
Interaction with presets
When apresetId is active, the preset’s own weight values are the base. Any key you specify in healthScoreWeights overrides only that key — omitted keys inherit the preset’s value. If you have no preset and no custom weights, the global defaults in the table above apply.