Workspace lints should have the option to be opt-out rather then opt-in #12984
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-triage
Status: This issue is waiting on initial triage.
Problem
The newly introduced
[lints]
section has a fatal flaw for our codebase, which is that we define all of our lints in our root workspace, but then have to opt in, in every crate, to those lints through[lints] workspace = true
.This means, for us, that we need to audit the Cargo.toml files every code review to make sure we didn't accidentally miss adding this line to the toml file. This introduces an additional manual workflows: a reviewer manually needs to check that it's present. (It looks from #12174 that at least
cargo new
adds the line automatically)Proposed Solution
Ideally we can force clippy lints for the entire workspace rather then having them be opt-in for every crate.
Currently we're using the rustflags hack to accomplish this and while I'd love to move away from it in due time, the 1.74 release unfortunately can't be the release that does this for us.
Notes
No response
The text was updated successfully, but these errors were encountered: