mirror of https://github.com/astral-sh/ruff
Update output in `resources/test/project/README.md` (#3587)
This commit is contained in:
parent
50f9db21da
commit
8dd3959e74
|
|
@ -9,30 +9,30 @@ Running from the repo root should pick up and enforce the appropriate settings f
|
||||||
|
|
||||||
```console
|
```console
|
||||||
∴ cargo run -p ruff_cli -- check crates/ruff/resources/test/project/
|
∴ cargo run -p ruff_cli -- check crates/ruff/resources/test/project/
|
||||||
crates/ruff/resources/test/project/examples/.dotfiles/script.py:1:1: I001 Import block is un-sorted or un-formatted
|
crates/ruff/resources/test/project/examples/.dotfiles/script.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
crates/ruff/resources/test/project/examples/.dotfiles/script.py:1:8: F401 `numpy` imported but unused
|
crates/ruff/resources/test/project/examples/.dotfiles/script.py:1:8: F401 [*] `numpy` imported but unused
|
||||||
crates/ruff/resources/test/project/examples/.dotfiles/script.py:2:17: F401 `app.app_file` imported but unused
|
crates/ruff/resources/test/project/examples/.dotfiles/script.py:2:17: F401 [*] `app.app_file` imported but unused
|
||||||
crates/ruff/resources/test/project/examples/docs/docs/file.py:1:1: I001 Import block is un-sorted or un-formatted
|
crates/ruff/resources/test/project/examples/docs/docs/file.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
crates/ruff/resources/test/project/examples/docs/docs/file.py:8:5: F841 Local variable `x` is assigned to but never used
|
crates/ruff/resources/test/project/examples/docs/docs/file.py:8:5: F841 [*] Local variable `x` is assigned to but never used
|
||||||
crates/ruff/resources/test/project/project/file.py:1:8: F401 `os` imported but unused
|
crates/ruff/resources/test/project/project/file.py:1:8: F401 [*] `os` imported but unused
|
||||||
crates/ruff/resources/test/project/project/import_file.py:1:1: I001 Import block is un-sorted or un-formatted
|
crates/ruff/resources/test/project/project/import_file.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
Found 7 errors.
|
Found 7 errors.
|
||||||
7 potentially fixable with the --fix option.
|
[*] 7 potentially fixable with the --fix option.
|
||||||
```
|
```
|
||||||
|
|
||||||
Running from the project directory itself should exhibit the same behavior:
|
Running from the project directory itself should exhibit the same behavior:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
∴ (cd crates/ruff/resources/test/project/ && cargo run -p ruff_cli -- check .)
|
∴ (cd crates/ruff/resources/test/project/ && cargo run -p ruff_cli -- check .)
|
||||||
examples/.dotfiles/script.py:1:1: I001 Import block is un-sorted or un-formatted
|
examples/.dotfiles/script.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
examples/.dotfiles/script.py:1:8: F401 `numpy` imported but unused
|
examples/.dotfiles/script.py:1:8: F401 [*] `numpy` imported but unused
|
||||||
examples/.dotfiles/script.py:2:17: F401 `app.app_file` imported but unused
|
examples/.dotfiles/script.py:2:17: F401 [*] `app.app_file` imported but unused
|
||||||
examples/docs/docs/file.py:1:1: I001 Import block is un-sorted or un-formatted
|
examples/docs/docs/file.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
examples/docs/docs/file.py:8:5: F841 Local variable `x` is assigned to but never used
|
examples/docs/docs/file.py:8:5: F841 [*] Local variable `x` is assigned to but never used
|
||||||
project/file.py:1:8: F401 `os` imported but unused
|
project/file.py:1:8: F401 [*] `os` imported but unused
|
||||||
project/import_file.py:1:1: I001 Import block is un-sorted or un-formatted
|
project/import_file.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
Found 7 errors.
|
Found 7 errors.
|
||||||
7 potentially fixable with the --fix option.
|
[*] 7 potentially fixable with the --fix option.
|
||||||
```
|
```
|
||||||
|
|
||||||
Running from the sub-package directory should exhibit the same behavior, but omit the top-level
|
Running from the sub-package directory should exhibit the same behavior, but omit the top-level
|
||||||
|
|
@ -40,10 +40,10 @@ files:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
∴ (cd crates/ruff/resources/test/project/examples/docs && cargo run -p ruff_cli -- check .)
|
∴ (cd crates/ruff/resources/test/project/examples/docs && cargo run -p ruff_cli -- check .)
|
||||||
docs/file.py:1:1: I001 Import block is un-sorted or un-formatted
|
docs/file.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
docs/file.py:8:5: F841 Local variable `x` is assigned to but never used
|
docs/file.py:8:5: F841 [*] Local variable `x` is assigned to but never used
|
||||||
Found 2 errors.
|
Found 2 errors.
|
||||||
2 potentially fixable with the --fix option.
|
[*] 2 potentially fixable with the --fix option.
|
||||||
```
|
```
|
||||||
|
|
||||||
`--config` should force Ruff to use the specified `pyproject.toml` for all files, and resolve
|
`--config` should force Ruff to use the specified `pyproject.toml` for all files, and resolve
|
||||||
|
|
@ -51,17 +51,17 @@ file paths from the current working directory:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
∴ (cargo run -p ruff_cli -- check --config=crates/ruff/resources/test/project/pyproject.toml crates/ruff/resources/test/project/)
|
∴ (cargo run -p ruff_cli -- check --config=crates/ruff/resources/test/project/pyproject.toml crates/ruff/resources/test/project/)
|
||||||
crates/ruff/resources/test/project/examples/.dotfiles/script.py:1:8: F401 `numpy` imported but unused
|
crates/ruff/resources/test/project/examples/.dotfiles/script.py:1:8: F401 [*] `numpy` imported but unused
|
||||||
crates/ruff/resources/test/project/examples/.dotfiles/script.py:2:17: F401 `app.app_file` imported but unused
|
crates/ruff/resources/test/project/examples/.dotfiles/script.py:2:17: F401 [*] `app.app_file` imported but unused
|
||||||
crates/ruff/resources/test/project/examples/docs/docs/concepts/file.py:1:8: F401 `os` imported but unused
|
crates/ruff/resources/test/project/examples/docs/docs/concepts/file.py:1:8: F401 [*] `os` imported but unused
|
||||||
crates/ruff/resources/test/project/examples/docs/docs/file.py:1:1: I001 Import block is un-sorted or un-formatted
|
crates/ruff/resources/test/project/examples/docs/docs/file.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
crates/ruff/resources/test/project/examples/docs/docs/file.py:1:8: F401 `os` imported but unused
|
crates/ruff/resources/test/project/examples/docs/docs/file.py:1:8: F401 [*] `os` imported but unused
|
||||||
crates/ruff/resources/test/project/examples/docs/docs/file.py:3:8: F401 `numpy` imported but unused
|
crates/ruff/resources/test/project/examples/docs/docs/file.py:3:8: F401 [*] `numpy` imported but unused
|
||||||
crates/ruff/resources/test/project/examples/docs/docs/file.py:4:27: F401 `docs.concepts.file` imported but unused
|
crates/ruff/resources/test/project/examples/docs/docs/file.py:4:27: F401 [*] `docs.concepts.file` imported but unused
|
||||||
crates/ruff/resources/test/project/examples/excluded/script.py:1:8: F401 `os` imported but unused
|
crates/ruff/resources/test/project/examples/excluded/script.py:1:8: F401 [*] `os` imported but unused
|
||||||
crates/ruff/resources/test/project/project/file.py:1:8: F401 `os` imported but unused
|
crates/ruff/resources/test/project/project/file.py:1:8: F401 [*] `os` imported but unused
|
||||||
Found 9 errors.
|
Found 9 errors.
|
||||||
9 potentially fixable with the --fix option.
|
[*] 9 potentially fixable with the --fix option.
|
||||||
```
|
```
|
||||||
|
|
||||||
Running from a parent directory should "ignore" the `exclude` (hence, `concepts/file.py` gets
|
Running from a parent directory should "ignore" the `exclude` (hence, `concepts/file.py` gets
|
||||||
|
|
@ -69,21 +69,21 @@ included in the output):
|
||||||
|
|
||||||
```console
|
```console
|
||||||
∴ (cd crates/ruff/resources/test/project/examples && cargo run -p ruff_cli -- check --config=docs/ruff.toml .)
|
∴ (cd crates/ruff/resources/test/project/examples && cargo run -p ruff_cli -- check --config=docs/ruff.toml .)
|
||||||
docs/docs/concepts/file.py:5:5: F841 Local variable `x` is assigned to but never used
|
docs/docs/concepts/file.py:5:5: F841 [*] Local variable `x` is assigned to but never used
|
||||||
docs/docs/file.py:1:1: I001 Import block is un-sorted or un-formatted
|
docs/docs/file.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
docs/docs/file.py:8:5: F841 Local variable `x` is assigned to but never used
|
docs/docs/file.py:8:5: F841 [*] Local variable `x` is assigned to but never used
|
||||||
excluded/script.py:5:5: F841 Local variable `x` is assigned to but never used
|
excluded/script.py:5:5: F841 [*] Local variable `x` is assigned to but never used
|
||||||
Found 4 errors.
|
Found 4 errors.
|
||||||
4 potentially fixable with the --fix option.
|
[*] 4 potentially fixable with the --fix option.
|
||||||
```
|
```
|
||||||
|
|
||||||
Passing an excluded directory directly should report errors in the contained files:
|
Passing an excluded directory directly should report errors in the contained files:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
∴ cargo run -p ruff_cli -- check crates/ruff/resources/test/project/examples/excluded/
|
∴ cargo run -p ruff_cli -- check crates/ruff/resources/test/project/examples/excluded/
|
||||||
crates/ruff/resources/test/project/examples/excluded/script.py:1:8: F401 `os` imported but unused
|
crates/ruff/resources/test/project/examples/excluded/script.py:1:8: F401 [*] `os` imported but unused
|
||||||
Found 1 error.
|
Found 1 error.
|
||||||
1 potentially fixable with the --fix option.
|
[*] 1 potentially fixable with the --fix option.
|
||||||
```
|
```
|
||||||
|
|
||||||
Unless we `--force-exclude`:
|
Unless we `--force-exclude`:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue