Skip to main content
Iris Code gives each file two numbers. The health score, out of 100, sums up the problems found in the file. The complexity score, out of 10, shows how hard the code may be to follow. The same code, with the same settings and the same version of Iris Code, always gets the same result. No AI model is involved.
The table on this page lists the points each kind of finding takes off the health score, not the full list of rules Iris Code checks. Some rules take off no points, and some rows cover a group of findings rather than one rule. The number of rules measured for each language is on the accuracy benchmark page.

Health score

The health score starts at 100 and goes down for findings in the file. It stops at 0 rather than going negative. Use it to find files that need attention. A high score does not prove that the file works correctly or has no security problems. Each finding has a severity level. In the table, an error-level warning is a more serious warning and a warning-level warning is a less serious one. The weight key is the name you use to change a deduction in .irisconfig.json. A few of the security rows in plain words:
  • Open redirect - a link that sends visitors to an address taken from the request, which an attacker can point anywhere.
  • TLS verification disabled - a secure connection that no longer checks it is talking to the right server.
  • SQL concatenation - a database query built by joining text together, which can let someone change the query.
  • Insecure RNG - random numbers from a generator that is not safe for passwords or tokens.
  • ReDoS-risk regex - a search pattern that can become extremely slow on certain input.
@ts-ignore costs more than console.log because it is a deliberate decision to switch off TypeScript’s type checking for a line. It removes a safety net, while a console.log only adds clutter.
An unused function costs more than an unused variable because a dead function wastes time later: someone eventually traces it and finds 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. So a file with one long function is flagged but not heavily penalised, because the deductions follow how serious each kind of finding is.

Complexity score

The complexity score is a separate scale from 1 to 10. Health asks whether the code has problems; complexity asks how hard the code is to understand. The score starts at 1 and stops at 10. Each factor below can only add a limited amount, so no single factor can push the score to the top on its own.

Workspace health score

The workspace health score is the average of the health scores of every file in the scanned project. One very unhealthy file pulls the average down, but it does not dominate the result, because every file Iris Code checked counts equally.

Language differences

The TypeScript-specific deductions, for any usage, @ts-ignore, non-null assertions and missing return types, only apply to JavaScript and TypeScript files. They are always zero for Go, Python, Ruby, C#, Java and Rust. This means health scores cannot be compared directly across languages: a Go file and a TypeScript file with the same structure may score differently.

Configurable thresholds

The limits that decide when a deduction applies can all be changed, in VS Code settings or in a .irisconfig.json file at the root of your project. Because two projects can use different limits, the same file may get different health scores in different repositories. You can change:
  • Function length - the most lines a function can have before a deduction applies
  • File length - the most lines a file can have
  • Max functions per file - the most functions allowed in one file
  • Max imports per file - the most imports of outside packages allowed in one file
  • Max parameter count - the most parameters a function can take before longParamList applies
When you are signed in, you can change any deduction with healthScoreWeights in .irisconfig.json. Setting a weight to 0 stops that finding affecting the score without switching off the check: the finding still appears in results, it just does not change the number. See Scoring Weights for the full reference.