rust-lang / rust-lang/rust-clippy

cargo metadata lints

Open
#967 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Should we add lints that check the cargo metadata for issues like having the same library, but different versions of it, in the dependency tree?

Or should that be in another project?

There are multiple granularities of such a lint.

  1. lint any time a crate appears with different versions (easy)
  2. lint only if the crate is included by the top level crate (easy)
  3. lint only if the multiple versions are observable at the top level crate (hard)

related:

https://github.com/rust-lang/cargo/issues/2363
https://github.com/rust-lang/cargo/issues/2064

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 reading the cargo metadata dependency-tree context and the related Cargo issues 2363 and 2064. Compare the three proposed lint granularities, especially the hard top-level observability case, and clarify which scope the project should support before implementation; done requires an agreed scope and corresponding lint behavior.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.