rust-lang / rust-lang/rust-clippy

require macro and generic testcases for new lints and lint updates

Open
#3,982 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T-macros
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

Given how many lints are currently broken for code inside macros, and how many lints have been so over the years, I think it should be a requirement for new lints to at least contain one test that tries to break the lint when used inside a macro. I believe most issues could have been caught by just remembering that macros exists when testing a new lint.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the repository's existing lint test conventions and how tests exercise code inside macros; no specific file or entry point is identified in the issue. Determine where a requirement for generic and macro testcases could be defined, and consider the work complete when new and updated lints consistently include both kinds of coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing-qa, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.