Skip to content

Commit 7673826

Browse files
authored
expand the issue template for new lints (#15336)
When I first tried contributing to clippy, I encountered the problem that a lot of lint suggestions overlapped with existing lints, so I would spend a bunch of time implementing something only to figure out it wasn't actually needed. The "comparison with existing lints" field should hopefully reduce this somewhat, while not incresing the burden of requesting a new lint too much due to not being mandatory. changelog: none
2 parents 03ae8b0 + a19b46d commit 7673826

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/ISSUE_TEMPLATE/new_lint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,24 @@ body:
4848
```
4949
validations:
5050
required: true
51+
- type: textarea
52+
id: comparison
53+
attributes:
54+
label: Comparision with existing lints
55+
description: |
56+
What makes this lint different from any existing lints that are similar, and how are those differences useful?
57+
58+
You can [use this playground template to see what existing lints are triggered by the bad code][playground]
59+
(make sure to use "Tools > Clippy" and not "Build").
60+
You can also look through the list of [rustc's allowed-by-default lints][allowed-by-default],
61+
as those won't show up in the playground above.
62+
63+
[allowed-by-default]: https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
64+
65+
[playground]: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&code=%23%21%5Bwarn%28clippy%3A%3Apedantic%29%5D%0A%23%21%5Bwarn%28clippy%3A%3Anursery%29%5D%0A%23%21%5Bwarn%28clippy%3A%3Arestriction%29%5D%0A%23%21%5Bwarn%28clippy%3A%3Aall%29%5D%0A%23%21%5Ballow%28clippy%3A%3Ablanket_clippy_restriction_lints%2C+reason+%3D+%22testing+to+see+if+any+restriction+lints+match+given+code%22%29%5D%0A%0A%2F%2F%21+Template+that+can+be+used+to+see+what+clippy+lints+a+given+piece+of+code+would+trigger
66+
placeholder: Unlike `clippy::...`, the proposed lint would...
67+
- type: textarea
68+
id: context
69+
attributes:
70+
label: Additional Context
71+
description: Any additional context that you believe may be relevant.

0 commit comments

Comments
 (0)