ruff/crates
konstin 0096938789
Optionally show fixes when using --features ecosystem_ci with cargo and --show-fixes at runtime (#4191)
* Generate fixes when using --show-fixes

Example command: `cargo run --bin ruff -- --no-cache --select F401
--show-source --show-fixes
crates/ruff/resources/test/fixtures/pyflakes/F401_9.py`

Before, `--show-fixes` was ignored:

```
crates/ruff/resources/test/fixtures/pyflakes/F401_9.py:4:22: F401 [*] `foo.baz` imported but unused
  |
4 | __all__ = ("bar",)
5 | from foo import bar, baz
  |                      ^^^ F401
  |
  = help: Remove unused import: `foo.baz`

Found 1 error.
[*] 1 potentially fixable with the --fix option.
```

After:

```
crates/ruff/resources/test/fixtures/pyflakes/F401_9.py:4:22: F401 [*] `foo.baz` imported but unused
  |
4 | __all__ = ("bar",)
5 | from foo import bar, baz
  |                      ^^^ F401
  |
  = help: Remove unused import: `foo.baz`

ℹ Suggested fix
1 1 | """Test: late-binding of `__all__`."""
2 2 |
3 3 | __all__ = ("bar",)
4   |-from foo import bar, baz
  4 |+from foo import bar

Found 1 error.
[*] 1 potentially fixable with the --fix option.
```

* Add `--format ecosystem-ci`

* cargo dev generate-all

* Put behind cargo feature

* Regenerate docs

* Don't test ecosystem_ci feature on CI

* Use top level flag instead

* Fix

* Simplify code based on #4191

* Remove old TODO comment
2023-05-10 17:45:57 +02:00
..
flake8_to_ruff Bump version to 0.0.265 (#4248) 2023-05-05 13:16:05 -04:00
ruff Optionally show fixes when using --features ecosystem_ci with cargo and --show-fixes at runtime (#4191) 2023-05-10 17:45:57 +02:00
ruff_benchmark Always generate fixes (#4239) 2023-05-10 07:06:14 +00:00
ruff_cache
ruff_cli Optionally show fixes when using --features ecosystem_ci with cargo and --show-fixes at runtime (#4191) 2023-05-10 17:45:57 +02:00
ruff_dev Add schemars feature (#4305) 2023-05-09 16:15:18 +02:00
ruff_diagnostics Remove functor from autofix title (#4245) 2023-05-10 07:21:15 +00:00
ruff_formatter Replace row/column based Location with byte-offsets. (#3931) 2023-04-26 18:11:02 +00:00
ruff_macros Remove functor from autofix title (#4245) 2023-05-10 07:21:15 +00:00
ruff_python_ast Add schemars feature (#4305) 2023-05-09 16:15:18 +02:00
ruff_python_formatter Move typos to pre-commit config (#4148) 2023-04-29 12:13:35 -04:00
ruff_python_semantic Remove current_ prefix from some Context methods (#4325) 2023-05-09 19:40:12 +00:00
ruff_python_stdlib Avoid RUF008 if field annotation is immutable (#4039) 2023-04-20 16:02:12 -04:00
ruff_rustpython
ruff_testing_macros Use Rust 1.69 (#4065) 2023-04-22 23:04:17 +01:00
ruff_wasm Always generate fixes (#4239) 2023-05-10 07:06:14 +00:00