You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies if this is a duplicate or already fixed; the closest issue I found to this one was #7231. This issue is similar, but much smaller scoped. When I run black --check, it gives me a list of filenames that would be reformatted, not just a count. When I run ruff format --check, it only gives me statistics. The list of filenames is much more useful when the format check is run during CI, and it'd be nice to add it to ruff.
I'm running ruff 0.0.291. Here's a sample output from black and from ruff:
~/my_code % ruff format --check .
warning: `ruff format` is a work-in-progress, subject to change at any time, and intended only for experimentation.
5 files would be reformatted, 264 files left unchanged
~/my_code % black --check .
would reformat /path/to/my_code/my_file.py
Oh no! 💥 💔 💥
1 file would be reformatted, 268 files would be left unchanged.
The text was updated successfully, but these errors were encountered:
## Summary
We now list each changed file when running with `--check`.
Closes#7782.
## Test Plan
```
❯ cargo run -p ruff_cli -- format foo.py --check
Compiling ruff_cli v0.0.292 (/Users/crmarsh/workspace/ruff/crates/ruff_cli)
rgo + Finished dev [unoptimized + debuginfo] target(s) in 1.41s
Running `target/debug/ruff format foo.py --check`
warning: `ruff format` is a work-in-progress, subject to change at any time, and intended only for experimentation.
Would reformat: foo.py
1 file would be reformatted
```
@charliermarsh It would also be useful to have that when running it without--check (or at least allow to enable it with an option). Usecase: I use the pre-commit config to run Ruff locally before each commit, but also on the CI (for all files).
Locally, I want to automatically change the files with the formatter on a commit.
In the CI, I want to see what files are not correctly formatted.
And thanks for the amazing tools (Ruff and uv) @charliermarsh! 😁
Apologies if this is a duplicate or already fixed; the closest issue I found to this one was #7231. This issue is similar, but much smaller scoped. When I run
black --check
, it gives me a list of filenames that would be reformatted, not just a count. When I runruff format --check
, it only gives me statistics. The list of filenames is much more useful when the format check is run during CI, and it'd be nice to add it to ruff.I'm running ruff 0.0.291. Here's a sample output from black and from ruff:
The text was updated successfully, but these errors were encountered: