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 clippy doesn't give warnings/errors after cargo check for clippy::cargo lint #6911

Closed
akshatagarwl opened this issue Mar 15, 2021 · 3 comments
Labels
C-bug Category: Clippy is not doing the correct thing I-false-negative Issue: The lint should have been triggered on code, but wasn't

Comments

@akshatagarwl
Copy link

Steps to reproduce:

  • Initialize a project with the cargo init command
  • Add the #![deny(clippy::cargo)] lint in the main.rs file
  • Run cargo clippy
    Checking clippy_check_bug v0.1.0 (/home/humancalico/clippy_check_bug)
error: package `clippy_check_bug` is missing `package.description` metadata
  |
note: the lint level is defined here
 --> src/main.rs:1:9
  |
1 | #![deny(clippy::cargo)]
  |         ^^^^^^^^^^^^^
  = note: `#[deny(clippy::cargo_common_metadata)]` implied by `#[deny(clippy::cargo)]`
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata

error: package `clippy_check_bug` is missing `either package.license or package.license_file` metadata
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata

error: package `clippy_check_bug` is missing `package.repository` metadata
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata

error: package `clippy_check_bug` is missing `package.readme` metadata
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata

error: package `clippy_check_bug` is missing `package.keywords` metadata
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata

error: package `clippy_check_bug` is missing `package.categories` metadata
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata

error: aborting due to 6 previous errors

error: could not compile `clippy_check_bug`

To learn more, run the command again with --verbose.
  • run cargo check
    Checking clippy_check_bug v0.1.0 (/home/humancalico/clippy_check_bug)
    Finished dev [unoptimized + debuginfo] target(s) in 0.18s
  • run cargo clippy
    Finished dev [unoptimized + debuginfo] target(s) in 0.00s
  • run cargo clean
  • run cargo clippy again
    Gives the same errors as before

Meta

  • cargo clippy -V: clippy 0.0.212 (cb75ad5 2021-02-10)
  • rustc -Vv:
      rustc 1.50.0 (cb75ad5db 2021-02-10)
      binary: rustc
      commit-hash: cb75ad5db02783e8b0222fee363c5f63f7e2cf5b
      commit-date: 2021-02-10
      host: x86_64-unknown-linux-gnu
      release: 1.50.0
    
@akshatagarwl akshatagarwl added C-bug Category: Clippy is not doing the correct thing I-false-negative Issue: The lint should have been triggered on code, but wasn't labels Mar 15, 2021
@akshatagarwl
Copy link
Author

Update: not just for clippy::cargo lint but for all lints

@Y-Nak
Copy link
Contributor

Y-Nak commented Mar 16, 2021

This is a duplicate of #4612.

@akshatagarwl
Copy link
Author

Oops didn't see that. I only searched for open issues while searching for this. Sorry 😥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-false-negative Issue: The lint should have been triggered on code, but wasn't
Projects
None yet
Development

No branches or pull requests

2 participants