Expand description
Lightweight Solution Intelligence checks used by ctx_optimize.
The analyzer intentionally favours explainable regex-based heuristics over a complete parser. Findings are suggestions, not compiler diagnostics.
Structs§
- Optimize
Finding - One simplification opportunity identified in a source file.
- Optimize
Report - Complete analysis result for one source file.
- Optimize
Summary - Aggregate counts for an
OptimizeReport.
Functions§
- analyze_
file - Analyze
contentfor simple, high-signal simplification opportunities. - detect_
native_ feature_ replacements - detect_
oneline_ candidates - Detect multi-line Rust functions whose body is already a single expression.
- detect_
reuse_ candidates - Detect repeated three-line code sequences in the current file or nearby project sources.
- detect_
single_ impl_ traits - Detect Rust traits which currently exist only to abstract one implementation.
- detect_
single_ product_ factories - Render a human-readable optimization report.
- detect_
stdlib_ alternatives - Detect code which likely duplicates a standard-library facility.
- detect_
yagni - Detect abstractions whose present form is unlikely to justify their cost.
- format_
report_ json - Render a machine-readable optimization report.
- format_
report_ text