Skip to content

refactor(linter): add FixKind to Fix#18363

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-21-refactor_linter_add_fixkind_to_fix_
Jan 23, 2026
Merged

refactor(linter): add FixKind to Fix#18363
graphite-app[bot] merged 1 commit intomainfrom
01-21-refactor_linter_add_fixkind_to_fix_

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Jan 21, 2026

Add FixKind to Fix so the language server can filter them out for "fix all" code actions / commands.

Copy link
Member Author

Sysix commented Jan 21, 2026


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 hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jan 21, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 21, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks
⏩ 41 skipped benchmarks1


Comparing 01-21-refactor_linter_add_fixkind_to_fix_ (b614b43) with main (c4132fb)2

Open in CodSpeed

Footnotes

  1. 41 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (a63c88d) during the generation of this report, so c4132fb was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a FixKind field to the Fix struct to track the type of fix being applied (safe fix, suggestion, dangerous fix, etc.). This enables better classification and handling of different types of code fixes throughout the linter.

Changes:

  • Added kind: FixKind field to the Fix struct with appropriate initialization
  • Updated all Fix constructors and test fixtures to include the new field
  • Implemented fix kind merging logic using bitwise union for composite fixes

Reviewed changes

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

File Description
crates/oxc_linter/src/fixer/fix.rs Added kind field to Fix struct, updated constructors, added with_kind builder method, implemented fix kind merging in merge_fixes, and added size assertion test
crates/oxc_linter/src/fixer/mod.rs Updated all test constant fixtures to include kind: FixKind::None
crates/oxc_linter/src/tsgolint.rs Updated fix creation to use FixKind::SafeFix for fixes and FixKind::Suggestion for suggestions, updated test assertions
crates/oxc_linter/src/disable_directives.rs Updated directive removal fixes to use FixKind::Fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Sysix Sysix force-pushed the 01-21-refactor_linter_add_fixkind_to_fix_ branch from b98ea32 to b614b43 Compare January 22, 2026 13:08
@Sysix Sysix marked this pull request as ready for review January 22, 2026 14:07
@Sysix Sysix requested a review from camc314 as a code owner January 22, 2026 14:07
Copy link
Member

@camchenry camchenry left a comment

Choose a reason for hiding this comment

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

I thought I had already made this change somewhere... must have been in an experimental PR. Makes sense to me.

@camchenry camchenry added the 0-merge Merge with Graphite Merge Queue label Jan 23, 2026
Copy link
Member

camchenry commented Jan 23, 2026

Merge activity

Add `FixKind` to `Fix` so the language server can filter them out for "fix all" code actions / commands.
@graphite-app graphite-app bot force-pushed the 01-21-refactor_linter_add_fixkind_to_fix_ branch from b614b43 to 5f1c26d Compare January 23, 2026 15:13
@graphite-app graphite-app bot merged commit 5f1c26d into main Jan 23, 2026
21 checks passed
@graphite-app graphite-app bot deleted the 01-21-refactor_linter_add_fixkind_to_fix_ branch January 23, 2026 15:18
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments