Skip to content

chore(oxlint/lsp): respect RuleCustomization.autofix for "fix all" code actions#21781

Merged
graphite-app[bot] merged 1 commit into
mainfrom
04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions
May 5, 2026
Merged

chore(oxlint/lsp): respect RuleCustomization.autofix for "fix all" code actions#21781
graphite-app[bot] merged 1 commit into
mainfrom
04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions

Conversation

@Sysix

@Sysix Sysix commented Apr 26, 2026

Copy link
Copy Markdown
Member

Pull request overview

Updates the oxlint LSP “fix all” / “fix all dangerous” code actions to respect rulesCustomization.<rule>.autofix = false, so rules opted out of autofix aren’t included in fix-all edits.

Sysix commented Apr 26, 2026

Copy link
Copy Markdown
Member Author

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent changes, fast-track this PR to the front of 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.

@Sysix Sysix changed the title e(oxlint/lsp): respect RuleCustomization.autofix for "fix all" code actions chore(oxlint/lsp): respect RuleCustomization.autofix for "fix all" code actions Apr 26, 2026
@Sysix Sysix force-pushed the 04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions branch from e1a8a4c to 5edede1 Compare April 26, 2026 12:29
@Sysix Sysix force-pushed the 04-25-chore_oxlint_lsp_respect_rulecustomization.serverity_for_lsp_diagnostics branch from d97aff6 to 91eb4be Compare April 26, 2026 12:29
@camc314 camc314 self-assigned this Apr 27, 2026
@Sysix Sysix force-pushed the 04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions branch from 5edede1 to 82949ba Compare April 27, 2026 18:06
@Sysix Sysix force-pushed the 04-25-chore_oxlint_lsp_respect_rulecustomization.serverity_for_lsp_diagnostics branch from 91eb4be to cd4cbfd Compare April 28, 2026 19:35
@Sysix Sysix force-pushed the 04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions branch from 82949ba to 75f2e3b Compare April 28, 2026 19:35
@Sysix Sysix requested a review from Copilot April 28, 2026 19:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the oxlint LSP “fix all” / “fix all dangerous” code actions to respect rulesCustomization.<rule>.autofix = false, so rules opted out of autofix aren’t included in fix-all edits.

Changes:

  • Thread rules_customization into fix-all code action generation and filter out edits for rules with autofix: false.
  • Carry the originating OxcCode in FixedContentKind::LintRule so fix-all filtering can identify the rule per edit.
  • Add an LSP fixture + snapshot and a server test covering the autofix: false behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
apps/oxlint/src/lsp/utils.rs Adds get_full_rule_name helper and plugin-prefix conversion used for customization lookups.
apps/oxlint/src/lsp/code_actions.rs Filters fix-all actions based on RulesCustomization.autofix and updates matching for LintRule(OxcCode).
apps/oxlint/src/lsp/error_with_position.rs Plumbs OxcCode into FixedContentKind::LintRule and reuses get_full_rule_name for rule-name reconstruction.
apps/oxlint/src/lsp/server_linter.rs Passes rules_customization into fix-all helpers and adds an integration-style test for autofix customization.
apps/oxlint/src/lsp/options.rs Clarifies that RuleCustomization.autofix applies to both safe and dangerous fix-all actions.
apps/oxlint/src/lsp/snapshots/fixtures_lsp_rules_customization_autofix@test.ts.snap Snapshot asserting fix-all is omitted when autofix is disabled for a rule.
apps/oxlint/fixtures/lsp/rules_customization/autofix/test.ts Fixture input for the new autofix-disabled snapshot/test.

Comment thread apps/oxlint/src/lsp/utils.rs Outdated
Comment thread apps/oxlint/src/lsp/utils.rs Outdated
@Sysix Sysix force-pushed the 04-25-chore_oxlint_lsp_respect_rulecustomization.serverity_for_lsp_diagnostics branch from cd4cbfd to f32a579 Compare April 29, 2026 18:31
@Sysix Sysix force-pushed the 04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions branch from 75f2e3b to b5bc74b Compare April 29, 2026 18:31
@Sysix Sysix marked this pull request as ready for review April 29, 2026 18:37
@Sysix Sysix requested a review from camc314 as a code owner April 29, 2026 18:37
@Sysix Sysix force-pushed the 04-25-chore_oxlint_lsp_respect_rulecustomization.serverity_for_lsp_diagnostics branch from f32a579 to 095fc4f Compare April 29, 2026 21:09
@Sysix Sysix force-pushed the 04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions branch from b5bc74b to 06ce7f3 Compare April 29, 2026 21:09
@Sysix Sysix force-pushed the 04-25-chore_oxlint_lsp_respect_rulecustomization.serverity_for_lsp_diagnostics branch from 095fc4f to 0bb42d8 Compare May 4, 2026 20:15
@Sysix Sysix force-pushed the 04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions branch from 06ce7f3 to bcd9cb9 Compare May 4, 2026 20:15
@graphite-app graphite-app Bot force-pushed the 04-25-chore_oxlint_lsp_respect_rulecustomization.serverity_for_lsp_diagnostics branch 2 times, most recently from db5bff5 to 1d5f179 Compare May 5, 2026 09:27
@graphite-app graphite-app Bot force-pushed the 04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions branch from bcd9cb9 to 41e8c45 Compare May 5, 2026 09:27
@graphite-app graphite-app Bot changed the base branch from 04-25-chore_oxlint_lsp_respect_rulecustomization.serverity_for_lsp_diagnostics to graphite-base/21781 May 5, 2026 09:37
@graphite-app graphite-app Bot force-pushed the graphite-base/21781 branch from 1d5f179 to 692bab9 Compare May 5, 2026 09:42
@graphite-app graphite-app Bot force-pushed the 04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions branch from 41e8c45 to d6813a7 Compare May 5, 2026 09:42
@graphite-app graphite-app Bot changed the base branch from graphite-base/21781 to main May 5, 2026 09:43
@graphite-app graphite-app Bot force-pushed the 04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions branch from d6813a7 to e41293a Compare May 5, 2026 09:43
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label May 5, 2026

camc314 commented May 5, 2026

Copy link
Copy Markdown
Contributor

Merge activity

…code actions (#21781)

> ## Pull request overview

> Updates the oxlint LSP “fix all” / “fix all dangerous” code actions to respect `rulesCustomization.<rule>.autofix = false`, so rules opted out of autofix aren’t included in fix-all edits.
@graphite-app graphite-app Bot force-pushed the 04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions branch from e41293a to fd9510e Compare May 5, 2026 09:48
@graphite-app graphite-app Bot merged commit fd9510e into main May 5, 2026
25 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label May 5, 2026
@graphite-app graphite-app Bot deleted the 04-26-e_oxlint_lsp_respect_rulecustomization.autofix_for_fix_all_code_actions branch May 5, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants