ruff/docs
Carl Meyer 42d52ebbec
Support FORCE_COLOR env var (#10839)
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`.
2024-04-08 15:29:29 -06:00
..
.overrides/partials/integrations/analytics Move some MkDocs responsibilities around (#5542) 2023-07-05 22:06:01 +00:00
assets Update docs to match updated logo and color palette (#5283) 2023-06-22 11:19:34 -04:00
formatter Move deviations from formatter README to documentation (#10444) 2024-03-18 08:22:28 +00:00
stylesheets fix(docs): admonition in dark mode (#9502) 2024-01-13 07:43:13 -05:00
.gitignore Fix gitignore to not ignore files that are required (#7538) 2023-09-21 21:33:09 +02:00
configuration.md ruff server - A new built-in LSP for Ruff, written in Rust (#10158) 2024-03-08 20:57:23 -08:00
faq.md Support FORCE_COLOR env var (#10839) 2024-04-08 15:29:29 -06:00
formatter.md docs: Lint -> Format in formatter.md (#10777) 2024-04-04 16:50:55 +00:00
installation.md docs: remove . from check and format commands (#10217) 2024-03-13 10:10:48 -05:00
integrations.md Bump version to v0.3.5 (#10717) 2024-04-01 13:15:32 -04:00
linter.md docs: remove . from check and format commands (#10217) 2024-03-13 10:10:48 -05:00
preview.md Spellcheck & grammar (#10375) 2024-03-13 02:34:23 +00:00
requirements-insiders.txt Add a formatting step using mdformat as part of generate_mkdocs.py (#10484) 2024-03-21 00:37:40 +00:00
requirements.txt Add a formatting step using mdformat as part of generate_mkdocs.py (#10484) 2024-03-21 00:37:40 +00:00
tutorial.md Update number of implemented rules to "over 800" (#10500) 2024-03-20 22:39:37 -04:00
versioning.md Spellcheck & grammar (#10375) 2024-03-13 02:34:23 +00:00