Skip to main content
By default, Iris deducts a fixed number of points per finding — secrets cost 10, a warning-level finding costs 3, and so on. With 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.
KeyDefaultWhat it penalises
hardcodedSecret10Per hardcoded secret found — largest single deduction
errorWarning5Per error-severity structural warning
warningWarning3Per warning-severity structural warning
tsIgnore3Per @ts-ignore comment (TS/JS only)
anyUsage2Per explicit any type (TS/JS only)
deepNesting2Multiplier applied to deep nesting score per function
unusedFunction2Per unused function definition
consoleLog1Per console/debug print statement
longParamList1Per long parameter list finding
unusedVar1Per 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 anyUsage and tsIgnore above 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
{
  "presetId": "security",
  "healthScoreWeights": {
    "hardcodedSecret": 18,
    "consoleLog": 3,
    "anyUsage": 2
  }
}

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
{
  "presetId": "balanced",
  "healthScoreWeights": {
    "consoleLog": 0,
    "unusedVar": 0,
    "unusedFunction": 0
  }
}
Setting a weight to 0 means that finding type does not affect the health score at all — it still shows in the sidebar and still fires inline diagnostics if enabled, but it contributes nothing to the 0–100 number. Use this intentionally.

Interaction with presets

When a presetId 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.

Configuring via Config Studio

Open Account → Config, switch to Custom mode, then expand the Custom scoring accordion. Each weight field shows the current preset default next to the input — you only need to touch the keys you want to change. Click Sync to VS Code when done; only the non-default keys are written to the config file.