Skip to content

Formatter: include filenames in ruff format --check #7782

@matt-gardner

Description

@matt-gardner

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.

Metadata

Metadata

Assignees

Labels

cliRelated to the command-line interfaceformatterRelated to the formatter

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions