Add support for ruff-ecosystem format comparisons with black (#8419)

Extends https://github.com/astral-sh/ruff/pull/8416 activating the
`black-and-ruff` and `black-then-ruff` formatter comparison modes for
ecosystem checks allowing us to compare changes to Black across the
ecosystem.
This commit is contained in:
Zanie Blue
2023-11-01 20:29:25 -05:00
committed by GitHub
parent 2f7e2a8de3
commit ebad36da06
8 changed files with 75 additions and 48 deletions

View File

@@ -37,6 +37,12 @@ Run `ruff format` ecosystem checks comparing with changes to code that is alread
ruff-ecosystem format ruff "./target/debug/ruff" --format-comparison ruff-then-ruff
```
Run `ruff format` ecosystem checks comparing with the Black formatter:
```shell
ruff-ecosystem format black ruff -v --cache python/checkouts --format-comparison black-and-ruff
```
The default output format is markdown, which includes nice summaries of the changes. You can use `--output-format json` to display the raw data — this is
particularly useful when making changes to the ecosystem checks.