rust-lang / rust-lang/rust-clippy

Add --no-fail-fast flag

Open
#17,015 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description
Summary

Add a --no-fail-fast flag to cargo clippy so Clippy can continue checking as many workspace
packages and targets as possible after encountering errors, then report all collected diagnostics at
the end.

Motivation

When running Clippy on a large workspace, for example:

cargo clippy --workspace --all-targets --all-features

the command may stop after the first crate or target that fails to compile. This makes it harder to
clean up a large codebase because developers often have to run Clippy repeatedly:

1. Run Clippy.
2. Fix the first batch of errors.
3. Run Clippy again.
4. Discover errors in another package or target.
5. Repeat.

For large Rust workspaces, this feedback loop is slow and inefficient. It would be useful to have
behavior similar to test runners such as cargo nextest --no-fail-fast, where the tool continues
collecting failures where possible and exits non-zero only after reporting the full set of
discovered issues.

### Proposed behavior

Add a flag such as:

cargo clippy --workspace --all-targets --all-features --no-fail-fast

or an equivalent name, which would ask Clippy/Cargo to continue checking independent packages and
targets even if some package fails.

Expected behavior:

- Continue checking packages/targets that do not depend on the failed package.
- Collect and print all diagnostics discovered during the run.
- Exit with a non-zero status if any error or denied lint occurred.
- Preserve the current fail-fast behavior by default.

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 with the cargo clippy command and compare its current fail-fast behavior with the proposed --no-fail-fast invocation. Define how independent packages and targets continue, how diagnostics are collected, and how the final non-zero status is determined while preserving the default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.