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
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
longParamListfires