refactor: Deduplicate word simulation logic in resource_lint.rs #207
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
rust
technical-debt
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/patch-seq#207
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
crates/compiler/src/resource_lint.rscontains nearly identical word simulation logic duplicated in two places:simulate_word_call- 102 lines, no diagnosticsanalyze_word_call_with_context- 221 lines, with diagnosticsBoth handle:
Impact
Proposed Solution
Extract common simulation logic into a shared function with configurable diagnostic emission:
Or use a visitor pattern:
Files Affected
crates/compiler/src/resource_lint.rsAcceptance Criteria
Labels
refactor, technical-debt, critical
https://github.com/navicore/patch-seq/pull/216