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

disable/filter cargo check diagnostics #14798

Closed
adamse opened this issue May 13, 2023 · 3 comments · Fixed by #15262
Closed

disable/filter cargo check diagnostics #14798

adamse opened this issue May 13, 2023 · 3 comments · Fixed by #15262
Labels
A-cargo cargo related issues A-config configuration C-feature Category: feature request

Comments

@adamse
Copy link
Contributor

adamse commented May 13, 2023

The unused_code diagnostic drives me crazy when writing something new, too many useless annotations.

I made a patch to filter cargo check diagnostics here: adamse@42a52ce
(I've extended the existing rust-analyzer.diagnostics.disabled setting to also apply to cargo check.)

If the project is interested in this feature I would be happy to upstream it.

@adamse adamse added the C-feature Category: feature request label May 13, 2023
@HKalbasi
Copy link
Member

Doesn't disabling "check on save" work for you?

@adamse
Copy link
Contributor Author

adamse commented May 13, 2023

No, that doesn't sound like what I want. I just want to disable a subset of them in my editor.

@HKalbasi
Copy link
Member

Ah I see. I think it make sense to make it upstream, but under a separate config (so that ignoring, for example unused-mut of r-a doesn't remove the rustc one)

@Veykril Veykril added A-cargo cargo related issues A-config configuration labels May 26, 2023
adamse added a commit to adamse/rust-analyzer that referenced this issue Jul 11, 2023
adamse added a commit to adamse/rust-analyzer that referenced this issue Jul 11, 2023
adamse added a commit to adamse/rust-analyzer that referenced this issue Jul 11, 2023
adamse added a commit to adamse/rust-analyzer that referenced this issue Jul 11, 2023
adamse added a commit to adamse/rust-analyzer that referenced this issue Aug 8, 2023
bors added a commit that referenced this issue Aug 8, 2023
add check.ignore to list cargo check diagnostics to ignore (dead_code, unused_imports, ...)

fixes #14798
@bors bors closed this as completed in 9cb1f45 Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cargo cargo related issues A-config configuration C-feature Category: feature request
Projects
None yet
3 participants