`eprintln!` warnings are not (easily) testable
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
Remark (not for this PR): hm, these
eprintln!s feel problematic to me in terms of being able to actually test them. We probably need to not directly useeprintln!and instead use some other custom interceptor which allows promoting warnings -> errors when testing [or such] 🤔
Originally posted by @jieyouxu in https://github.com/rust-lang/rustfmt/pull/6651#discussion_r3323255564
There are a few instances, the one I noticed was
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
Start in src/config/config_type.rs around lines 437-444 and inspect the eprintln! use referenced by the issue. Determine how warnings can be intercepted and promoted during tests; done means the warning behavior is testable without relying on direct eprintln! calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100