rust-lang / rust-lang/rust-clippy

Consider reserving new lint name at least one release before the implementation of the lint is released

Open
#13,197 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

Description

Assume clippy releases n, n + 1. If planning to implement a lint, called "new-lint" in clippy release n + 1, consider reserving the name, new-lint, in clippy release n. The idea is that the lint implementation should be a dummy that allows everything, for release n, and should switch to the actual implementation on release n + 1.

This would be nice to have, because some teams like to fix or allow n + 1 lints in version n and upgrade to version n + 1 only when all lints have been dealt with, i.e., the fixes or allows required by release n + 1 are added for code compiled with release n in CI or other infrastructure or team workflow. If the name were reserved in release n, then it could be allowed to avoid a lint in release n + 1.

The problem can be solved by individual users using the unknown-lint allow. But doing that spreads out the work among clippy users. The scheme I propose might reduce such busy-ness among users.

Version
rustc 1.80.0 (051478957 2024-07-21) (Fedora 1.80.0-1.fc40)
binary: rustc
commit-hash: 051478957371ee0084a7c0913941d2a8c4757bb9
commit-date: 2024-07-21
host: x86_64-unknown-linux-gnu
release: 1.80.0
LLVM version: 18.1.6
Additional Labels

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how Clippy lints are introduced and how releases are planned; the issue does not name files or tests. Done means determining whether a lint name can be reserved with a harmless implementation one release before the actual lint, and documenting or implementing the agreed approach.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.