mirror of https://github.com/astral-sh/ruff
Docs (`linter.md`): clarify that Python files are always searched for in subdirectories (#15882)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
5bf0e2e95e
commit
9d83e76a3b
|
|
@ -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`.
|
||||
|
|
|
|||
Loading…
Reference in New Issue