pub enum FixStrategy {
Rename(Vec<RenameMapping>),
RemoveAttribute,
ImportPathChange {
old_path: String,
new_path: String,
},
CssVariablePrefix {
old_prefix: String,
new_prefix: String,
exclude_patterns: Vec<String>,
},
EnsureDependency {
package: String,
new_version: String,
},
Manual,
Llm {
context: Option<String>,
},
}Expand description
Known fix strategies keyed by rule ID. Each entry defines how to transform incidents from that rule into text edits.
Variants§
Rename(Vec<RenameMapping>)
Simple text replacement: rename the matched text. The mapping is propName/componentName/importedName old -> new.
RemoveAttribute
Remove the matched attribute (e.g., delete the entire prop from a JSX tag, or remove a decorator in Python, etc.).
ImportPathChange
Replace an import/include source path.
CssVariablePrefix
Replace a CSS variable/class prefix.
Fields
EnsureDependency
Ensure a dependency exists at the correct version in the project manifest (e.g., package.json for Node.js, Cargo.toml for Rust, go.mod for Go).
Manual
No auto-fix available – flag for manual review.
Llm
Send to LLM for fix generation.
context carries pre-formatted strategy data (strategy type, from/to,
mappings, target structure, etc.) from the FixStrategyEntry.
None when the rule fell through to Llm via label inference or default.