rust-lang / rust-lang/rust-clippy

Clippy errors after the first problematic crate in the workspace

Open
#15,075 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Summary

When running cargo clippy it prints all warnings for all crates in the workspace.

However when running it with -Dwarnings, it errors after the first crate that contains error without showing all of the errors within the workspace.

cargo clippy --workspace --locked -- -Dwarnings

Instead it should collect all errors, print them, then error.

Reproducer

I tried this code:

<code>

I expected to see this happen:

Instead, this happened:

Version
rustc 1.89.0-nightly (414482f6a 2025-05-13)
binary: rustc
commit-hash: 414482f6a0d4e7290f614300581a0b55442552a3
commit-date: 2025-05-13
host: aarch64-pc-windows-msvc
release: 1.89.0-nightly
LLVM version: 20.1.4
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 reproducing the behavior with cargo clippy --workspace --locked -- -Dwarnings and inspect how workspace crates are processed after the first failure. Done means all errors from every applicable crate are printed before the command exits with an error; the issue does not name source files or tests to begin with.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.