docs: remove . from check and format commands#10217
Conversation
. from check and format commandsdocs: remove . from check and format commands
|
There was a problem hiding this comment.
Thank you @hoel-bagard for PRing this change.
I'm conflicted on this. While . is not strictly necessary, it shows users how to pass a specific path. Removing the path everywhere might indicate that ruff doesn't accept custom paths. Maybe we leave it in one example and mention that the path can be omitted?
That was also part of my reasoning when I left it in the preview mode documentation PR. I made this PR to have consistent documentation.
Looking at the documentation, the The ruff formatter documentation has an explanation on how to format a single file/directory, using the same example for the linter should be enough, what do you think ? |
Co-authored-by: Micha Reiser <micha@reiser.io>
|
I think I'd personally prefer to keep these, since in my view at least it's more explicit and clearer for readers that don't know that Ruff defaults to |
|
Humph... I want to get rid of these because people think they're needed and they're really not. It degrades the idea that we're a workspace oriented tool. Checking a specific path seems like a less common behavior that we could document separately. |
|
I defer to you @zanieb. |
zanieb
left a comment
There was a problem hiding this comment.
Sorry for the back-and-forth, I pushed a couple additional touch-ups and attempted to address Micha's concern.
# Conflicts: # docs/installation.md
## Summary Since #10217 the [formatter docs](https://docs.astral.sh/ruff/formatter/) contained ``` ruff format # Format all files in the current directory. ruff format path/to/code/ # Lint all files in `path/to/code` (and any subdirectories). ruff format path/to/file.py # Format a single file. ``` I believe the `Lint` here is a copy-paste typo from the [linter docs](https://docs.astral.sh/ruff/linter/). ## Test Plan N/A
## Summary Since astral-sh#10217 the [formatter docs](https://docs.astral.sh/ruff/formatter/) contained ``` ruff format # Format all files in the current directory. ruff format path/to/code/ # Lint all files in `path/to/code` (and any subdirectories). ruff format path/to/file.py # Format a single file. ``` I believe the `Lint` here is a copy-paste typo from the [linter docs](https://docs.astral.sh/ruff/linter/). ## Test Plan N/A
Summary
This PR modifies the documentation to use
ruff checkinstead ofruff check ., andruff formatinstead ofruff format ., as discussed here