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

cargo clean before clippy or it may not work. #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

logannc
Copy link

@logannc logannc commented Sep 24, 2020

rust-lang/rust-clippy#1495 and rust-lang/rust-clippy#4612 for details.

In short, clippy is not guaranteed to output results unless a few conditions are satisfied. The easiest of which is running cargo clean before clippy.

There are alternatives that may be preferable for performance, but I suggest this for a simple, easy first pass.

@LoganDGraham
Copy link

LoganDGraham commented Feb 9, 2021

For those bothered by this, the obvious solution is to define a bash alias, e.g.,
alias cargoclippy="cargo clean && cargo clippy". Do so in you .bashrc file (or in an associated file called by .bashrc).
Now, running cargoclippy consecutively will continue to print persistent clippy lints.
Of course, one may still run cargo clean and cargo clippy in sequence manually, if desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants