Improve handling of ruff executable lookup

This commit is contained in:
Zanie
2023-10-27 12:40:42 -05:00
parent 39c04c8335
commit eb769ac03d
2 changed files with 58 additions and 7 deletions

View File

@@ -16,18 +16,19 @@ pip install -e ./python/ruff-ecosystem
ruff-ecosystem <check | format> <baseline executable> <comparison executable>
```
Note executable paths must be absolute or relative to the current working directory.
Note executable paths may be absolute, relative to the current working directory, or will be looked up in the
current Python environment and PATH.
Run `ruff check` ecosystem checks comparing your debug build to your system Ruff:
```shell
ruff-ecosystem check "$(which ruff)" "./target/debug/ruff"
ruff-ecosystem check ruff "./target/debug/ruff"
```
Run `ruff format` ecosystem checks comparing your debug build to your system Ruff:
```shell
ruff-ecosystem format "$(which ruff)" "./target/debug/ruff"
ruff-ecosystem format ruff "./target/debug/ruff"
```
## Development
@@ -35,11 +36,11 @@ ruff-ecosystem format "$(which ruff)" "./target/debug/ruff"
When developing, it can be useful to set the `--pdb` flag to drop into a debugger on failure:
```shell
ruff-ecosystem check "$(which ruff)" "./target/debug/ruff" --pdb
ruff-ecosystem check ruff "./target/debug/ruff" --pdb
```
You can also provide a path to cache checkouts to speed up repeated runs:
```shell
ruff-ecosystem check "$(which ruff)" "./target/debug/ruff" --cache ./repos
ruff-ecosystem check ruff "./target/debug/ruff" --cache ./repos
```