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

Running cargo clippy -- -Wall gives a bogus file not found error #4147

Closed
jyn514 opened this issue May 26, 2019 · 6 comments
Closed

Running cargo clippy -- -Wall gives a bogus file not found error #4147

jyn514 opened this issue May 26, 2019 · 6 comments

Comments

@jyn514
Copy link
Member

jyn514 commented May 26, 2019

When I run cargo clippy -- -Wall, I get the following error, in addition to several warnnings that '-Wall' is an invalid flag:

error: failed to stat `/home/joshua/Documents/Programming/rust/compiler/target/debug/.fingerprint/compiler-550d52f76e432f75/dep-bin-compiler-550d52f76e432f75`

I can't reproduce this with any other invalid flags or errors, maybe -Wall is being special cased? I can reproduce this on any cargo project I've tried.

Meta

rustc --version --verbose:

rustc 1.35.0 (3c235d560 2019-05-20)
binary: rustc
commit-hash: 3c235d5600393dfe6c36eeed34042efad8d4f26e
commit-date: 2019-05-20
host: x86_64-unknown-linux-gnu
release: 1.35.0
LLVM version: 8.0

cargo clippy -V: clippy 0.0.212 (265318d 2019-05-17)
This is on stable.

@Manishearth
Copy link
Member

-Wclippy::all

@Manishearth
Copy link
Member

But that error shouldn't happen either way

@Manishearth
Copy link
Member

Oh, it gives another error first for me

The flag `-Wall` does not exist in `rustc`. Most useful lints are enabled by
default. Use `rustc -W help` to see all available lints. It's more common to put
warning settings in the crate root using `#![warn(LINT_NAME)]` instead of using
the command line flag directly.

We do plan to make cargo clippy proxy to clippy lints eventually, but for now you have to -Wclippy::

@jyn514
Copy link
Member Author

jyn514 commented May 26, 2019

It would be nice for that to be in the help output, I thought from that message that -Wall just didn't exist for clippy. Running cargo clippy -- -W help does show clippy::all, but it has so much output it's easy to miss it.

@jyn514
Copy link
Member Author

jyn514 commented May 26, 2019

Also, cargo clippy -- -W help shows the same (very long) message three times, I think once for each crate in my project.

@Manishearth
Copy link
Member

Yeah, that's a part of #3837 .

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

No branches or pull requests

2 participants