-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing
Description
Summary
After upgrading to rust 1.67.0 clippy --fix now fails if you have any untracked files in your git repository. I now have to pass the --allow-dirty flag to use clippy --fix. I didn't have to do this in rust 1.66.0.
If this is a deliberate change, I suggest adding an --allow-untracked flag to clippy --fix so that we can get the old behavior back.
Reproducer
reproduce:
cargo new foo
cd foo
git add .
git commit -m "Initial commit"
touch bar.txt
cargo clippy --fix
I expected to see this happen: Success
Instead, this happened:
error: the working directory of this package has uncommitted changes, and `cargo fix` can potentially perform destructive changes; if you'd like to suppress this error pass `--allow-dirty`, `--allow-staged`, or commit the changes to these files:
* bar.txt (dirty)
Version
rustc 1.67.0 (fc594f156 2023-01-24)
binary: rustc
commit-hash: fc594f15669680fa70d255faec3ca3fb507c3405
commit-date: 2023-01-24
host: x86_64-unknown-linux-gnu
release: 1.67.0
LLVM version: 15.0.6
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing