-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ruff format --check
outputs "files left unchanged", which is slightly confusing
#9132
Labels
Comments
This makes sense to me! Thanks for raising. |
zanieb
added
good first issue
Good for newcomers
cli
Related to the command-line interface
labels
Dec 14, 2023
Good call. Or "already formatted"? (Is that less clear?) |
@charliermarsh I like "already formatted" as well! |
charliermarsh
pushed a commit
that referenced
this issue
Dec 18, 2023
…es (#9153) ## Summary <!-- What's the purpose of the change? What does it do, and why? --> New messages for "format" mode. Fixes #9132 ## Test Plan <!-- How was it tested? --> I ran the tests specified in `CONTRIBUTING.md` ```bash cargo run -p ruff_cli -- check /path/to/some_files.py --no-cache cargo run -p ruff_cli -- format --check /path/to/some_files.py --no-cache cargo clippy --workspace --all-targets --all-features -- -D warnings RUFF_UPDATE_SCHEMA=1 cargo test pre-commit run --all-files --show-diff-on-failure ``` **Note:** In case no files are detected, either correctly formatted, changed, or unchanged, it does not display a message. Wouldn't it be better to show some message in this case?
in version 0.7.2, type |
Looking at the PR, this seems intentional. See this comment, although I'm not sure why. @charliermarsh do you remember? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is pretty minor, but when you run:
It's slightly confusing to me that it says "files left unchanged", since in
--check
mode, it will never change any files. The first time I saw this, I thought I had accidentally forgotten to add the--check
argument in a Nox session.Would it be a small improvement if
ruff format
checked if it was in--check
mode and changed the output to something like:Then again, maybe using the exact output from normal
ruff format
is better for consistency? No strong opinions from me, just an observation. Feel free to close if you disagree.The text was updated successfully, but these errors were encountered: