Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(analyzer): use rule name for quick fix #4469

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

ematipico
Copy link
Member

Summary

This PR is the start of a refactor I have been doing in order to add a new feature in Biome via LSP.

The feature I am developing is meant for next, but this feature is harmless and it should be merged in main so all new rules are in line with the new way of creating action categories. Doing on next would increase the maintenance debt.

This PR changes how the ActionCategory of rules is computed. Until now, all rules had quickfix.biome as action category, which was fine, With this PR, now all rules will have a personalised action category e.g. quickfix.biome.suspicious.noDebugger. This will allow LSP users to decide which code actions to filter.

Eventually, users will be able to decide which quick fixes to apply, but that will be for another PR.

Test Plan

The current tests should pass

@github-actions github-actions bot added A-Linter Area: linter A-LSP Area: language server protocol L-JavaScript Language: JavaScript and super languages labels Nov 5, 2024
@ematipico ematipico requested review from a team November 5, 2024 10:09
Copy link

codspeed-hq bot commented Nov 5, 2024

CodSpeed Performance Report

Merging #4469 will degrade performances by 6.92%

Comparing refactor/quickfi-action-category (a9da2fe) with main (50093fb)

Summary

❌ 2 regressions
✅ 97 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main refactor/quickfi-action-category Change
pure_9395922602181450299.css[cached] 3.4 ms 3.6 ms -6.92%
react.production.min_3378072959512366797.js[cached] 1.8 ms 2 ms -6.65%

@ematipico ematipico force-pushed the refactor/quickfi-action-category branch from 05b0b5d to a9da2fe Compare November 5, 2024 11:58
@ematipico ematipico merged commit 041e825 into main Nov 6, 2024
11 of 12 checks passed
@ematipico ematipico deleted the refactor/quickfi-action-category branch November 6, 2024 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter A-LSP Area: language server protocol L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants