mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-20 04:29:47 +00:00
Fixes #5499 ## Summary Add support for `FORCE_COLOR` env var, as specified at https://force-color.org/ ## Test Plan I wrote an integration test for this, and then realized that can't work, since we use a dev-dependency on `colored` with the `no-color` feature to avoid ANSI color codes in test snapshots. So this is just tested manually. `cargo run --features test-rules -- check --no-cache --isolated - --select RUF901 --diff < /dev/null` shows a colored diff. `cargo run --features test-rules -- check --no-cache --isolated - --select RUF901 --diff < /dev/null | less` does not have color, since we pipe it to `less`. `FORCE_COLOR=1 cargo run --features test-rules -- check --no-cache --isolated - --select RUF901 --diff < /dev/null | less` does have color (after this diff), even though we pipe it to `less`. |
||
|---|---|---|
| .. | ||
| .overrides/partials/integrations/analytics | ||
| assets | ||
| formatter | ||
| stylesheets | ||
| .gitignore | ||
| configuration.md | ||
| faq.md | ||
| formatter.md | ||
| installation.md | ||
| integrations.md | ||
| linter.md | ||
| preview.md | ||
| requirements-insiders.txt | ||
| requirements.txt | ||
| tutorial.md | ||
| versioning.md | ||