Skip to main content
Iris Code calculates two numbers per file: a health score out of 100, and a complexity score out of 10. Both are deterministic. The same code produces the same result today, next month, on your machine, on a colleague’s, and in CI. No model and no sampling is involved. That property is what makes them usable as a gate, since a threshold only means something if the number behind it is stable.

Health score

The health score starts at 100 and decreases as findings are applied. It floors at 0 rather than going negative. It answers one question: is there something wrong with this file?
@ts-ignore carries a heavier penalty than console.log because it is an active decision to suppress the type system - it doesn’t just add noise, it removes a safety net. A console.log is clutter; a @ts-ignore is a deliberate override of a type error.
Unused functions carry a heavier penalty than unused variables because a dead function is a maintenance trap. Someone will eventually spend time tracing it and find it does nothing. An unused variable is easier to spot and cheaper to remove.
Error-level warnings cost more than warning-level warnings, which cost more than info-level findings. This means a file with one long function is flagged but not cratered - the deduction ladder reflects the actual severity of each finding type.

Complexity score

The complexity score is a separate 1–10 scale that answers a different question from health: not “is this code problematic?” but “how hard is this code to reason about?” The score starts at 1 and caps at 10. Each factor has a cap on its contribution - no single factor can max out the score alone.

Workspace health score

The workspace health score is the average of all per-file health scores across your scanned project. One very unhealthy file will pull the average down but won’t dominate the score unfairly - the average distributes the signal across every file Iris Code has analysed.

Language differences

TypeScript-specific deductions - any usage, @ts-ignore, non-null assertions, and missing return types - only apply to JS/TS files and are automatically zeroed out for Go, Python, Ruby, C#, Java, and Rust. Health scores are not directly comparable across languages: a Go file and a TypeScript file with identical structure may score differently.

Configurable thresholds

The thresholds that feed into the health score are all configurable. You can adjust them via VS Code settings or a .irisconfig.json file at your project root. Because two projects can have different thresholds, the same file may produce different health scores in different repositories. Configurable thresholds include:
  • Function length - maximum number of lines per function before a deduction applies
  • File length - maximum number of lines per file
  • Max functions per file - ceiling on the number of functions in a single file
  • Max imports per file - ceiling on external import count
  • Max parameter count - maximum number of parameters per function before longParamList fires
Pro users can override any deduction weight via healthScoreWeights in .irisconfig.json. Setting a weight to 0 removes that finding’s contribution to the score entirely without disabling detection - the finding still appears in results, it just doesn’t affect the number. See Scoring Weights for the full reference.