ruff/crates/ruff
Brent Westbrook 165091a31c
Add TextEmitter::with_color and disable colors in unreadable_files test (#19562)
Summary
--

I looked at other uses of `TextEmitter`, and I think this should be the
only one affected by this. The other integration tests must work
properly since they're run with `assert_cmd_snapshot!`, which I assume
triggers the `SHOULD_COLORIZE` case, and the `cfg!(test)` check will
work for uses in `ruff_linter`.


4a4dc38b5b/crates/ruff_linter/src/message/text.rs (L36-L44)

Alternatively, we could probably move this to a CLI test instead.

Test Plan
--

`cargo test -p ruff`, which was failing on `main` with color codes in
the output before this
2025-07-25 15:47:49 -04:00
..
resources/test/fixtures Rename ruff_cli crate to ruff (#9557) 2024-01-16 17:47:01 -05:00
src Add TextEmitter::with_color and disable colors in unreadable_files test (#19562) 2025-07-25 15:47:49 -04:00
tests Add support for specifying minimum dots in detected string imports (#19538) 2025-07-24 15:48:23 -04:00
build.rs Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
Cargo.toml Bump 0.12.5 (#19528) 2025-07-24 09:12:50 -04:00