Mechanical fixes
A fix is offered only when Iris Code can identify the complete code involved and none of the cases described below, where the edit could change what the program does, applies. In these tables, “proved” means Iris Code has identified that code exactly.Imports that need review
An import lets one file use code from another. Loading that other file can also run code, such as registering a plugin. Removing an unused name must not accidentally stop that work. JavaScript keeps the module loading with a side-effect import, such asimport './a'. TypeScript behaves differently depending on verbatimModuleSyntax, so Iris Code leaves a whole unused value import for you to review. A type-only import, written with import type, does not load a module and can be removed.
Vue and Svelte imports are kept because a component’s template may use a name that appears unused in its script.
Iris Code also leaves these import combinations unchanged:
- A namespace import combined with a named import.
- Mixed type-import styles, or two type-only TypeScript imports.
- Rust
usestatements with an attribute or documentation comment. - Side-effect imports, or imports with comments between the statements being merged.
Variables that need review
A variable may be used by code outside the part Iris Code can check. Python class or module attributes and Go package variables are therefore kept. JavaScript and TypeScript declarations at the top of a file are eligible only when the file is a module. Shared script declarations are kept because another script may use them.Debug statements that need review
A debug statement prints information while you work. Iris Code only offers to remove one when it can identify the complete statement without removing other work. The fix is left for you when:- The statement shares a line with other code, or its call is unfinished.
- Its arguments may do work, such as assigning a value, incrementing a counter, using
awaitor calling something other than a simple formatter. - It is the entire body of an
if,else, loop or arrow function without braces. - It is the last expression of a Ruby method, which can determine the return value.
- Removing it would leave a Go import or variable unused, or a Python block empty.
console.error reports errors and is never removed. Removing an unused function is a suggestion to review, rather than an automatic mechanical fix.
Structural suggestions
The risk column describes how far a change reaches:
- Local: the change stays inside one file.
- Cross-file: other files in the project need matching changes, such as updated imports.
- Public API: the change affects code that other files or projects depend on, such as an exported name.
changes-public-api; by default, this needs approval.
The estimated effect is a guide to the size of the change. It does not promise that the gate will pass, and overlapping parts of the code are counted only once.
Iris Code leaves a change for review when it cannot identify the complete code to move. This includes some functions called indirectly by a framework, related metadata outside the identified code, and syntax it does not support.
See the language coverage table before relying on a particular suggestion.