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

feat(language_server): Add code actions to disable rules for the current line or entire file #6968

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

nrayburn-tech
Copy link
Collaborator

This definitely needs some cleanup by somebody more familiar with Rust, but I think it contains most of the important pieces. I'll leave a review with the different pieces that I know need cleanup.

Ref #6966.

Copy link

graphite-app bot commented Oct 27, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added A-editor Area - Editor and Language Server C-enhancement Category - New feature or request labels Oct 27, 2024
crates/oxc_language_server/src/main.rs Outdated Show resolved Hide resolved
crates/oxc_language_server/src/main.rs Show resolved Hide resolved
crates/oxc_language_server/src/main.rs Show resolved Hide resolved
crates/oxc_language_server/src/main.rs Show resolved Hide resolved
@nrayburn-tech
Copy link
Collaborator Author

Made some updates to this and added some TODOs in the code. I'm not sure the TODOs are something that can easily be resolved in this PR. I think they require larger changes.

So, this could probably be merged in as is (somebody may want to cleanup the code, but I think it hits the functional parts) or leave this as a draft and make some other PRs so that the TODOs can be resolved and then merge this in.

@Boshen
Copy link
Member

Boshen commented Nov 25, 2024

@Sysix can you help and get this merged.

@Boshen Boshen marked this pull request as ready for review November 25, 2024 08:48
Copy link
Collaborator

@Sysix Sysix left a comment

Choose a reason for hiding this comment

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

there is no quick fix option when no oxlint auto fix is available:
grafik

I expect as an user, to disable the diagnostic even when no auto fix is available

crates/oxc_language_server/src/main.rs Show resolved Hide resolved
crates/oxc_language_server/src/main.rs Show resolved Hide resolved
@Boshen
Copy link
Member

Boshen commented Nov 26, 2024

Do we have a consensus on this PR?

@nrayburn-tech
Copy link
Collaborator Author

I think so. I’ve got one bug to fix in it and I need to get it rebased.

Hopefully I’ll get to it by end of day tomorrow.

@Boshen Boshen marked this pull request as draft November 26, 2024 15:35
@Boshen
Copy link
Member

Boshen commented Nov 26, 2024

I think so. I’ve got one bug to fix in it and I need to get it rebased.

Hopefully I’ll get to it by end of day tomorrow.

Thank you.

@nrayburn-tech nrayburn-tech force-pushed the quick-fixes-to-disable-rule branch from 4f94384 to 635c573 Compare November 26, 2024 23:40
@nrayburn-tech
Copy link
Collaborator Author

Should be ready now, including the bug fix for the issue mentioned by @Sysix.

@nrayburn-tech nrayburn-tech marked this pull request as ready for review November 26, 2024 23:47
@Sysix
Copy link
Collaborator

Sysix commented Nov 26, 2024

Thanks you @nrayburn-tech, will look tomorrow on it :)

@Boshen Boshen requested a review from Sysix November 27, 2024 04:27
Copy link
Collaborator

@Sysix Sysix left a comment

Choose a reason for hiding this comment

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

tested it and works great <3

@Boshen Boshen merged commit c786074 into oxc-project:main Nov 28, 2024
18 checks passed
Boshen pushed a commit that referenced this pull request Nov 28, 2024
…ent line or entire file (#6968)

This definitely needs some cleanup by somebody more familiar with Rust,
but I think it contains most of the important pieces. I'll leave a
review with the different pieces that I know need cleanup.

Ref #6966.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-editor Area - Editor and Language Server C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants