Report-backed easy refactor.
Source: Decomplex report-tools-diagnostic-scan / Derived-State Staleness.
Problem:
src/ast/diagnostic_examples.rb#scan_file derives j from i, then continues with stateful scanning. The scanner is small, covered by tests, and suitable for a low-risk cleanup.
Acceptance:
- Refactor scanner state so the next describe index is explicit and not stale-derived.
- Add focused coverage for fix-line scanning and malformed annotations.
- No new
T.untyped slots.
- Decomplex/SlopCop metrics stay flat or improve.
Report-backed easy refactor.
Source: Decomplex
report-tools-diagnostic-scan/ Derived-State Staleness.Problem:
src/ast/diagnostic_examples.rb#scan_filederivesjfromi, then continues with stateful scanning. The scanner is small, covered by tests, and suitable for a low-risk cleanup.Acceptance:
T.untypedslots.