Iris

File Analysis

Iris analyses every supported file automatically as you open or save it. The File tab shows:

  • Enforcement snapshot — top-of-file readiness summary with score, blockers, hook posture, and trend direction
  • Health score — 0–100 composite score penalising warnings, secrets, deep nesting, long functions, and debug prints
  • Trend signal — score movement vs the previous snapshot once trend history exists
  • Language badge — Go / TypeScript / JavaScript / Python badge in the file header
  • Line counts — total lines, blank lines, code lines
  • Complexity score — 1–10 score based on function density, nesting depth, control flow, and import count
  • Function list — all detected functions with line numbers, each clickable to jump to source
  • Code smells — TODOs, unused code, magic numbers, debug prints, and long parameter lists grouped in one section
  • Coverage signal — whether a matching test file is detected (configurable via testConvention in .irisconfig.json)
Note: Unused import detection is TypeScript/JavaScript-only. Go and Python handle this at the compiler/runtime level.

TypeScript Metrics

Shown only for TS/JS files; hidden automatically for Go and Python.

MetricWhat it tracks
any usagesCounts explicit : any / as any. Each occurrence is clickable.
@ts-ignoreCount of TypeScript suppressions
Non-null assertionsCount of ! usages
Missing return typesExported functions without an explicit return type annotation

Code Smells

Iris detects several code smell patterns across all supported languages. Every finding is clickable to jump to the line.

SmellDetected inToggle setting
Debug prints — console.log/warn/errorJavaScript / TypeScriptenableConsoleLogWarnings
Debug prints — fmt.Print* / log.Print* / log.Fatal* / log.Panic*GoenableConsoleLogWarnings
Debug prints — print()PythonenableConsoleLogWarnings
Magic numbers — raw numeric literals (excluding 0 and 1) used inline without a named bindingAll supported languagesenableMagicNumberDetection
TODOs / FIXMEs / HACKs — from // comments (JS/TS, Go) and # comments (Python)All supported languagesenableTodoDetection
Long parameter lists — functions with too many parametersAll supported languagesenableLongParamDetection
Unused variables — declared but never referenced elsewhere in the fileAll supported languagesenableUnusedDetection
Unused functions — defined but never called within the file and not exportedAll supported languagesenableUnusedDetection
Tip: Disabling a toggle hides both the stat counter and the detail section from the sidebar entirely — useful for reducing visual clutter.

Warnings

Five warning types, each with configurable severity:

TypeDefault severityTriggers at
file-too-longerror / warning> threshold / > ⅔ threshold
function-too-longerror / warning> 2× threshold / > threshold
too-many-functionswarning> maxFunctionsPerFile
too-many-importswarning> maxImportsPerFile
no-exportsinfono exported identifier found
Tip: Override severity per warning type using severityOverrides in .irisconfig.json.