mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
![]() Fixes bug where `total_affected_rules` is empty, a division by zero error can occur if there are only errors and no rule changes. Calculates the maximum display per rule with the calculated project maximum as the upper bound instead of 50, this should show more rule variety when project maximums are lower. This commit was meant to be in #8223 but I missed it. |
||
---|---|---|
.. | ||
ruff_ecosystem | ||
pyproject.toml | ||
README.md |
ruff-ecosystem
Compare lint and format results for two different ruff versions (e.g. main and a PR) on real world projects.
Installation
From the Ruff project root, install with pip
:
pip install -e ./python/ruff-ecosystem
Usage
ruff-ecosystem <check | format> <baseline executable> <comparison executable>
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:
ruff-ecosystem check ruff "./target/debug/ruff"
Run ruff format
ecosystem checks comparing your debug build to your system Ruff:
ruff-ecosystem format ruff "./target/debug/ruff"
Development
When developing, it can be useful to set the --pdb
flag to drop into a debugger on failure:
ruff-ecosystem check ruff "./target/debug/ruff" --pdb
You can also provide a path to cache checkouts to speed up repeated runs:
ruff-ecosystem check ruff "./target/debug/ruff" --cache ./repos