rust-lang / rust-lang/rust-clippy
Lint to warn on use of `#[deny(lint)]` in code
Open
Nobody has claimed this yet.
A-lint
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
What it does
Warn on use of #[deny(lint)] / #![deny(lint)]
Advantage
- Avoid builds breaking due to a new Rust toolchain changing the behavior of a lint
- Give developers flexibility to be sloppy during development, resolving out the lints before merging (generally being enforced in CI)
Drawbacks
- It becomes awkward to
allowthis warning. A parent scope can do it. Unsure if you could in the same scope with!.Cargo.toml[lints]could also
Example
#![deny(elided-lifetimes-in-paths)]
pub struct Foo<'a> {}
fn foo(f: Foo) {}
Could be written as:
#![warn(elided-lifetimes-in-paths)]
pub struct Foo<'a> {}
fn foo(f: Foo) {}
with the suggestion to turn warnings into errors where relevant (e.g. CI)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation files or tests; start by locating Clippy's handling and tests for attribute-based lints, then review the examples for both inner and outer attributes. Done requires an agreed behavior for warning on deny attributes, including how the warning can be allowed, with coverage for the shown cases and the suggested replacement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100