Closed
Description
What it does
It checks for level attributes without a reason
.
I think it would be good to have a config value that sets the minimum lint level of the #[level()]
attribute. By default, it should only warn for allow
end expect
I actually don't think that this actually requires a config value :)
Lint Name
allow_lint_without_reason
Category
restriction
Advantage
Enforces the user to reason about allowed lints
Drawbacks
Updating current code bases will take quite some work
Example
#![feature(lint_reasons)]
#![allow(clippy::some_lint)]
Could be written as:
#![feature(lint_reasons)]
#![allow(clippy::some_lint, reason = "False positive rust-lang/rust-clippy#1002020")]
@rustbot claim