-
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
Error reading Clippy's configuration file... #3874
Comments
Yeah errors of clippy.toml files of dependencies should not be reported at all. |
I just checked. Our code for detecting the final binary doesn't seem to work anymore. All dependencies are run through clippy-driver, not sure when that changed. What we can do in the short term is to change the error to a normal lint so it will get silenced by We should make all the rust-clippy/clippy_lints/src/lib.rs Line 311 in 1cdac4a
buffer_lint (https://doc.rust-lang.org/nightly/nightly-rustc/rustc/session/struct.Session.html#method.buffer_lint).
|
The driver stuff got completely rewritten recently since rustc changed how drivers work. |
I ran into this as well, with a dependency having a |
…ctors (#155) * get_standing_orders_of_slot will always return models::NUM_OF_ACCOUNT entries * incorporated all inprovement suggestions, just refactoring * using unsafe to initialize array, as Standingorder does not implement Copy trait * clean up, sorry * indentation * uses array-macro to initialize the arrays * test * changing to newer rust version 1.36 * test only * another test to make rust run on travis server * just testing travis * reverting all unnecessary changes * updating rust to 1.36 in docker images * making clippy work: see here: rust-lang/rust-clippy#3874 * stupid testing as I can not yet test it locally * worst testing * clean up * just another test * one more test * final test * finally, Felix found the solution
I just ran into this as well because of using a very old pinned version of clippy on one project. Quick repro with an invalid config file, might be a different error path to having invalid keys in there: > cd $(mktemp -d)
> cargo new --lib foo
Created library `foo` package
> cd foo
> cargo add --git https://gist.github.com/Nemo157/963cf5ae958aabb40dbf35dea7b8a9e2 bar
Adding bar (unknown version) to dependencies
> cargo +stable clippy --all-targets
Updating git repository `https://gist.github.com/Nemo157/963cf5ae958aabb40dbf35dea7b8a9e2`
Checking bar v0.1.0 (https://gist.github.com/Nemo157/963cf5ae958aabb40dbf35dea7b8a9e2#b81c54a5)
error: error reading Clippy's configuration file `/home/wim/.cargo/git/checkouts/963cf5ae958aabb40dbf35dea7b8a9e2-9bdfc6a77ca53f42/b81c54a/clippy.toml`: expected an equals, found an identifier at line 1 |
I have also ran into this unfortunate bug due to using an unmaintained project as a dependency. I can take this under the assumption that it's still a |
Don't error on clippy.toml of dependencies Fixes #3874 Checking for `metadata` wasn't enough anymore. `--cap-lints allow` only appears when compiling deps though. changelog: none
I just ran into this with clippy on rust 1.49 for the
|
@tylerhawkes |
I tried it again and still get the same error. Here's the commands I did to reproduce. I'm inside of a podman container, but that shouldn't matter at all. I tried it on my mac and didn't get an error, so this seems to be linux specific. Cross compiling doesn't matter as I get the error whether I'm compiling for x86_64 or aarch64.
And here is the output of those commands:
|
My co-workers have also been seeing this. We all share the same podman image and it has |
Ah, you have Since Line 301 in 8e5c5a6
I now wonder, why we never had this complaint before 🤔 |
...
/opt/.cargo/registry/src/github.com-1ecc6299db9ec823/im-12.3.1/clippy.toml
: found deprecated fieldcyclomatic-complexity-threshold
. Please usecognitive-complexity-threshold
instead.I use clippy in CI, and started getting this error a few days ago. The error is coming from one of my dependencies, so I don't expect clippy to be checking it to begin with.
Is there a way to stop clippy from checking dependencies / make the error a warning instead?
The text was updated successfully, but these errors were encountered: