-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add a lint pass that warns about unknown annotations. #6884
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
Comments
+1 |
Related #2976. Nominating feature-complete. |
Related to #7318 |
Just a bug, more of a developer issue |
(I think we agreed informally that such a lint pass might be useful to some, but that it would be turned off ( |
This is fixed by #10316. |
hurray! |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Mar 12, 2021
…earth move lintcheck into its own crate This pr: * moves lintcheck out of `clippy dev` and into its own crate (`lintcheck`) (I should have done this earlier :D) * makes lintcheck terminate if it is not launched from the repo root (to prevent problems with wrong paths when using `cargo run` in the crate root) * fixes json lint messages leaking the runners `$HOME` when a lint messages comes from a proc macro that originates from a crate inside the `$CARGO_CACHE` * adds more documentation to lintchecks `README.md` and mentions lintcheck in `docs/basics.md` changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
The compiler does not warn about annotations it does not recognize. I recently noticed some code annotated with several instances of
#[incline]
. Those annotations had been sitting there unnoticed for over a year. It would be nice if the compiler would emit a warning.As discussed on IRC, one way this might be implemented would be marking annotations as 'used' when they are used, and then do a pass very late in compilation that checks for unused annotations. This would free the lint pass from having a list of valid annotations and their semantics.
The text was updated successfully, but these errors were encountered: