-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Consider configuring Clippy #848
Comments
I personally don't use clippy much, because, while it does find a number of legit issues, it also tends to find a significant number of false-positives (examples) and blindly fixing those usually makes code worse. I am also not a fan of suppressing warnings on each individual expression/function, etc, as that also makes code less readable for trivial reasons. Disabling lints in .toml sounds great to me! Is there some preconfigured set of lints with no false positives? |
Looks like the actual Enabling/Disabling lints through the config is still pending according to rust-lang/rfcs#2476 (comment) and rust-lang/cargo#5034 I guess an alternative, since clippy allows passing lints as flags to It may even make sense to have |
We can add |
1374: Implement `cargo lint` and fix some clippy errors r=alanhdu a=alanhdu This creates a `cargo lint` command that runs clippy with certain lints disabled. I've also gone ahead and fixed some of the lint errors, although there are many more still to go. cc #848 Co-authored-by: Alan Du <[email protected]>
we have |
According to rust-lang/rust-clippy#configuration:
We could consider adding Clippy configuration to allow running
cargo clippy
onrust-analyzer
while developing without reporting large number of warnings that are not relevant torust-analyzer
.For the lints that currently cannot be configured in a
TOML
file we can ignore those (allow those to report warnings) or add some "global" inner attributes that allow them.I think ideally running
cargo clippy
onrust-analyzer
should return no warnings / errors even if it means we allow some lints to pass. This could help people trying to contribute with creating more idiomatic solutions.The text was updated successfully, but these errors were encountered: