You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ruff check @arguments.txt # Lint using an input file, treating its contents as newline-delimited command-line arguments.
160
160
```
161
161
162
162
Or, to run Ruff as a formatter:
163
163
164
-
```shell
165
-
ruff format # Format all files in the current directory (and any subdirectories).
166
-
ruff format path/to/code/ # Format all files in `/path/to/code` (and any subdirectories).
167
-
ruff format path/to/code/*.py # Format all `.py` files in `/path/to/code`.
168
-
ruff format path/to/code/to/file.py # Format `file.py`.
169
-
ruff format @arguments.txt # Format using an input file, treating its contents as newline-delimited command-line arguments.
164
+
```console
165
+
$ ruff format # Format all files in the current directory (and any subdirectories).
166
+
$ ruff format path/to/code/ # Format all files in `/path/to/code` (and any subdirectories).
167
+
$ ruff format path/to/code/*.py # Format all `.py` files in `/path/to/code`.
168
+
$ ruff format path/to/code/to/file.py # Format `file.py`.
169
+
$ ruff format @arguments.txt # Format using an input file, treating its contents as newline-delimited command-line arguments.
170
170
```
171
171
172
172
Ruff can also be used as a [pre-commit](https://pre-commit.com/) hook via [`ruff-pre-commit`](https://github.com/astral-sh/ruff-pre-commit):
@@ -277,14 +277,14 @@ example, `[lint]` should be replaced with `[tool.ruff.lint]`.
277
277
Some configuration options can be provided via dedicated command-line arguments, such as those
278
278
related to rule enablement and disablement, file discovery, and logging level:
279
279
280
-
```shell
281
-
ruff check --select F401 --select F403 --quiet
280
+
```console
281
+
$ ruff check --select F401 --select F403 --quiet
282
282
```
283
283
284
284
The remaining configuration options can be provided through a catch-all `--config` argument:
0 commit comments