refactor(oxlint/lsp): check for FixedContentKind instead of guessing logic#19795
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
This PR refactors the fix_all_text_edit function in the LSP code actions module to use explicit type checking via FixedContentKind instead of relying on heuristics based on the length of the fixes array. This makes the code more maintainable and aligns it with the pattern already used in the apply_fix_code_actions function.
Changes:
- Replaced fragile length-based heuristic with explicit
FixedContentKindenum checking - Removed debug assertions that are no longer needed
- Used
.find()to locate the first real fix (LintRule or UnusedDirective) instead of.next().unwrap()
Merge activity
|
…g logic (#19795) > This PR refactors the `fix_all_text_edit` function in the LSP code actions module to use explicit type checking via `FixedContentKind` instead of relying on heuristics based on the length of the fixes array. This makes the code more maintainable and aligns it with the pattern already used in the `apply_fix_code_actions` function.
d8a6524 to
a45b9f4
Compare

Uh oh!
There was an error while loading. Please reload this page.