Skip to content

Commit

Permalink
Docs (linter.md): clarify that Python files are always searched for…
Browse files Browse the repository at this point in the history
… in subdirectories (#15882)

Co-authored-by: Alex Waygood <[email protected]>
  • Loading branch information
anordin95 and AlexWaygood authored Feb 4, 2025
1 parent 5bf0e2e commit 9d83e76
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/linter.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ and more.
## `ruff check`

`ruff check` is the primary entrypoint to the Ruff linter. It accepts a list of files or
directories, and lints all discovered Python files, optionally fixing any fixable errors:
directories, and lints all discovered Python files, optionally fixing any fixable errors.
When linting a directory, Ruff searches for Python files recursively in that directory
and all its subdirectories:

```console
$ ruff check # Lint all files in the current directory.
$ ruff check --fix # Lint all files in the current directory, and fix any fixable errors.
$ ruff check --watch # Lint all files in the current directory, and re-lint on change.
$ ruff check path/to/code/ # Lint all files in `path/to/code` (and any subdirectories).
$ ruff check # Lint files in the current directory.
$ ruff check --fix # Lint files in the current directory and fix any fixable errors.
$ ruff check --watch # Lint files in the current directory and re-lint on change.
$ ruff check path/to/code/ # Lint files in `path/to/code`.
```

For the full list of supported options, run `ruff check --help`.
Expand Down

0 comments on commit 9d83e76

Please sign in to comment.