rust-lang / rust-lang/rust-clippy
Clippy has no --color option
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Similar to other cargo tooling and cargo itself there should be a --color=always/never option for clippy.
I have situation where I'd like to pipe clippy into other programs and preserve the colors. But I see no way of achieving that.
Example bash: cargo test -- --color=always |& less preserves colors but cargo clippy -- --color=always |& less fails and just cargo clippy |& less strips colors.
@ rustbot label +C-enhancement
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported commands with cargo clippy and compare their color behavior with cargo test. Start by tracing Clippy's command-line option handling and the existing cargo color behavior; done means --color=always and --color=never work when output is piped, with colors preserved or suppressed as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100