rust-lang / rust-lang/rust-clippy
-D warnings is ignored when running with --fix
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Summary
If there are any warnings in my code and I run cargo clippy -- -D warnings I get an exit code of 101. If I run cargo clippy --fix -- -D warnings on the same code I get an exit status of 0.
Note: I'm using the ESP toolchain from espressif.
Reproducer
Code:
Any code that produces a warning
Current output:
Exit status 0
Desired output:
Exit status 101
Version
rustc 1.90.0-nightly (abf50ae2e 2025-09-16) (1.90.0.0)
binary: rustc
commit-hash: abf50ae2e46066e67e29fe856f9764c23aa9a3ca
commit-date: 2025-09-16
host: aarch64-apple-darwin
release: 1.90.0-nightly
LLVM version: 20.1.1
Additional Labels
No response
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
Start by reproducing the two commands in the issue, comparing cargo clippy -- -D warnings with cargo clippy --fix -- -D warnings and their exit statuses. Trace how the --fix invocation handles the forwarded -D warnings argument; done means warnings still produce exit status 101 when --fix is used.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100