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

Check rust lints when an unknown lint is detected #11855

Closed
alice-i-cecile opened this issue Nov 22, 2023 · 2 comments
Closed

Check rust lints when an unknown lint is detected #11855

alice-i-cecile opened this issue Nov 22, 2023 · 2 comments

Comments

@alice-i-cecile
Copy link

Description

Suppose we have a lint section that looks like this:

[lints.clippy]
missing_docs = "warn"

Then, clippy will emit:

warning[E0602]: unknown lint: `clippy::missing_docs`
  |
  = help: did you mean: `clippy::erasing_op`
  = note: requested on the command line with `-W clippy::missing_docs`
  = note: `#[warn(unknown_lints)]` on by default

Instead, clippy could check the lints provided by Rust, and provide a more helpful suggestion: that the lint is actually a Rust lint.

Version

rustc 1.74.0 (79e9716c9 2023-11-13)
binary: rustc
commit-hash: 79e9716c980570bfd1f666e3b16ac583f0168962
commit-date: 2023-11-13
host: x86_64-unknown-linux-gnu
release: 1.74.0
LLVM version: 17.0.4

Additional Labels

No response

@y21
Copy link
Member

y21 commented Nov 22, 2023

I'm not sure if this is something that can be fixed from clippy's side. unknown_lints is a rustc lint. Clippy doesn't emit this warning.

@alice-i-cecile
Copy link
Author

Sounds good, I'll open a duplicate on the Rust repo instead :)

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