ruff/crates/ruff_cli
Zanie Blue 2b95d3832b
Update fix summary message in check --diff to include unsafe fix hints (#7790)
Requires #7769 

Updates the CLI display for `ruff check --fix` to hint availability of
unsafe fixes.

 ```
❯ ruff check example.py --select F601,T201 --diff --no-cache
No errors fixed (1 fix available with `--unsafe-fixes`).
```

```
❯ ruff check example.py --select F601,T201,W292 --diff --no-cache
--- example.py
+++ example.py
@@ -1,2 +1,2 @@
 x = {'a': 1, 'a': 1}
-print(('foo'))
+print(('foo'))
\ No newline at end of file

Would fix 1 error (1 additional fix available with `--unsafe-fixes`).
```
```
❯ ruff check example.py --select F601,T201,W292 --diff --no-cache
--unsafe-fixes
--- example.py
+++ example.py
@@ -1,2 +1,2 @@
-x = {'a': 1}
-print(('foo'))
+x = {'a': 1, 'a': 1}
+print(('foo'))
\ No newline at end of file

Would fix 2 errors.
```
2023-10-10 10:50:35 -05:00
..
resources/test/fixtures Fix gitignore to not ignore files that are required (#7538) 2023-09-21 21:33:09 +02:00
src Update fix summary message in check --diff to include unsafe fix hints (#7790) 2023-10-10 10:50:35 -05:00
tests Update fix summary message in check --diff to include unsafe fix hints (#7790) 2023-10-10 10:50:35 -05:00
Cargo.toml Bump Ruff version to v0.0.292 (#7761) 2023-10-02 12:14:47 -04:00