repo: lint for correct tracing of errors?
Open
Nobody has claimed this yet.
linting
- Dominant language
- Rust
- Stars
- 1.9k
- Forks
- 238
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 100
Description
Have a lint that fires in the following case:
tracelimit::error_ratelimited!(?err, ?offer_id, "could not open channel",);
tracelimit::error_ratelimited!(err = err.as_ref() as &dyn std::error::Error, ?offer_id, "could not open channel",);
we want to always require the 2nd, as the first doesn't log the whole error chain.
Originally posted by @SvenGroot in https://github.com/microsoft/openvmm/pull/717#discussion_r1927841506
Contributor guide
No contributing guide indexed for this repository
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 by locating the lint infrastructure and the tracelimit::error_ratelimited! macro handling shown in the issue. Check existing lint tests or diagnostics, then add coverage demonstrating that the shorthand error argument is flagged while the explicit dyn std::error::Error form is accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100