rust-lang / rust-lang/rust-clippy
Auto macro tests pass
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Most often, macro processing in lints works on the level of not linting an item if it came from an [external] macro invocation. I am not completely sure it would be the same thing, but could we add an optional pass (like run-rustfix) that would take a source file, put its contents in an [external] macro_rules! and expand it back to source file and lint the expansion and do something depending on the output. It very well might be a performance hit, but I don't know how big.
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 by tracing Clippy's existing macro-processing behavior and the run-rustfix pass mentioned in the issue. Determine whether wrapping a source file in an external macro_rules! and linting the expansion is feasible, how its output should be handled, and what performance impact it has; done would require a settled design and an agreed implementation path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100