Skip to content

Commit e9e0a7e

Browse files
committed
1 parent e3270c6 commit e9e0a7e

File tree

129 files changed

+588
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+588
-4
lines changed

clippy_lints/src/approx_const.rs

+4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ impl LintPass for Pass {
6060
fn get_lints(&self) -> LintArray {
6161
lint_array!(APPROX_CONSTANT)
6262
}
63+
64+
fn name(&self) -> &'static str {
65+
"ApproxConstant"
66+
}
6367
}
6468

6569
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {

clippy_lints/src/arithmetic.rs

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ impl LintPass for Arithmetic {
5252
fn get_lints(&self) -> LintArray {
5353
lint_array!(INTEGER_ARITHMETIC, FLOAT_ARITHMETIC)
5454
}
55+
56+
fn name(&self) -> &'static str {
57+
"Arithmetic"
58+
}
5559
}
5660

5761
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {

clippy_lints/src/assertions_on_constants.rs

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ impl LintPass for AssertionsOnConstants {
3434
fn get_lints(&self) -> LintArray {
3535
lint_array![ASSERTIONS_ON_CONSTANTS]
3636
}
37+
38+
fn name(&self) -> &'static str {
39+
"AssertionsOnConstants"
40+
}
3741
}
3842

3943
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssertionsOnConstants {

clippy_lints/src/assign_ops.rs

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ impl LintPass for AssignOps {
5757
fn get_lints(&self) -> LintArray {
5858
lint_array!(ASSIGN_OP_PATTERN, MISREFACTORED_ASSIGN_OP)
5959
}
60+
61+
fn name(&self) -> &'static str {
62+
"AssignOps"
63+
}
6064
}
6165

6266
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {

clippy_lints/src/attrs.rs

+8
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ impl LintPass for AttrPass {
199199
UNKNOWN_CLIPPY_LINTS,
200200
)
201201
}
202+
203+
fn name(&self) -> &'static str {
204+
"Attributes"
205+
}
202206
}
203207

204208
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AttrPass {
@@ -500,6 +504,10 @@ impl LintPass for CfgAttrPass {
500504
fn get_lints(&self) -> LintArray {
501505
lint_array!(DEPRECATED_CFG_ATTR,)
502506
}
507+
508+
fn name(&self) -> &'static str {
509+
"DeprecatedCfgAttribute"
510+
}
503511
}
504512

505513
impl EarlyLintPass for CfgAttrPass {

clippy_lints/src/bit_mask.rs

+3
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ impl LintPass for BitMask {
108108
fn get_lints(&self) -> LintArray {
109109
lint_array!(BAD_BIT_MASK, INEFFECTIVE_BIT_MASK, VERBOSE_BIT_MASK)
110110
}
111+
fn name(&self) -> &'static str {
112+
"BitMask"
113+
}
111114
}
112115

113116
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BitMask {

clippy_lints/src/blacklisted_name.rs

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ impl LintPass for BlackListedName {
3737
fn get_lints(&self) -> LintArray {
3838
lint_array!(BLACKLISTED_NAME)
3939
}
40+
fn name(&self) -> &'static str {
41+
"BlacklistedName"
42+
}
4043
}
4144

4245
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlackListedName {

clippy_lints/src/block_in_if_condition.rs

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ impl LintPass for BlockInIfCondition {
4949
fn get_lints(&self) -> LintArray {
5050
lint_array!(BLOCK_IN_IF_CONDITION_EXPR, BLOCK_IN_IF_CONDITION_STMT)
5151
}
52+
53+
fn name(&self) -> &'static str {
54+
"BlockInIfCondition"
55+
}
5256
}
5357

5458
struct ExVisitor<'a, 'tcx: 'a> {

clippy_lints/src/booleans.rs

+4
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ impl LintPass for NonminimalBool {
5858
fn get_lints(&self) -> LintArray {
5959
lint_array!(NONMINIMAL_BOOL, LOGIC_BUG)
6060
}
61+
62+
fn name(&self) -> &'static str {
63+
"NonminimalBool"
64+
}
6165
}
6266

6367
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonminimalBool {

clippy_lints/src/bytecount.rs

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ impl LintPass for ByteCount {
3838
fn get_lints(&self) -> LintArray {
3939
lint_array!(NAIVE_BYTECOUNT)
4040
}
41+
42+
fn name(&self) -> &'static str {
43+
"ByteCount"
44+
}
4145
}
4246

4347
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ByteCount {

clippy_lints/src/cargo_common_metadata.rs

+4
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ impl LintPass for Pass {
6262
fn get_lints(&self) -> LintArray {
6363
lint_array!(CARGO_COMMON_METADATA)
6464
}
65+
66+
fn name(&self) -> &'static str {
67+
"CargoCommonMetadata"
68+
}
6569
}
6670

6771
impl EarlyLintPass for Pass {

clippy_lints/src/collapsible_if.rs

+4
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ impl LintPass for CollapsibleIf {
7878
fn get_lints(&self) -> LintArray {
7979
lint_array!(COLLAPSIBLE_IF)
8080
}
81+
82+
fn name(&self) -> &'static str {
83+
"CollapsibleIf"
84+
}
8185
}
8286

8387
impl EarlyLintPass for CollapsibleIf {

clippy_lints/src/const_static_lifetime.rs

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ impl LintPass for StaticConst {
3232
fn get_lints(&self) -> LintArray {
3333
lint_array!(CONST_STATIC_LIFETIME)
3434
}
35+
36+
fn name(&self) -> &'static str {
37+
"StaticConst"
38+
}
3539
}
3640

3741
impl StaticConst {

clippy_lints/src/copies.rs

+4
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ impl LintPass for CopyAndPaste {
110110
fn get_lints(&self) -> LintArray {
111111
lint_array![IFS_SAME_COND, IF_SAME_THEN_ELSE, MATCH_SAME_ARMS]
112112
}
113+
114+
fn name(&self) -> &'static str {
115+
"CopyAndPaste"
116+
}
113117
}
114118

115119
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CopyAndPaste {

clippy_lints/src/copy_iterator.rs

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ impl LintPass for CopyIterator {
3535
fn get_lints(&self) -> LintArray {
3636
lint_array![COPY_ITERATOR]
3737
}
38+
39+
fn name(&self) -> &'static str {
40+
"CopyIterator"
41+
}
3842
}
3943

4044
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CopyIterator {

clippy_lints/src/cyclomatic_complexity.rs

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ impl LintPass for CyclomaticComplexity {
4242
fn get_lints(&self) -> LintArray {
4343
lint_array!(CYCLOMATIC_COMPLEXITY)
4444
}
45+
46+
fn name(&self) -> &'static str {
47+
"CyclomaticComplexity"
48+
}
4549
}
4650

4751
impl CyclomaticComplexity {

clippy_lints/src/default_trait_access.rs

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ impl LintPass for DefaultTraitAccess {
3535
fn get_lints(&self) -> LintArray {
3636
lint_array!(DEFAULT_TRAIT_ACCESS)
3737
}
38+
39+
fn name(&self) -> &'static str {
40+
"DefaultTraitAccess"
41+
}
3842
}
3943

4044
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DefaultTraitAccess {

clippy_lints/src/derive.rs

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ impl LintPass for Derive {
6868
fn get_lints(&self) -> LintArray {
6969
lint_array!(EXPL_IMPL_CLONE_ON_COPY, DERIVE_HASH_XOR_EQ)
7070
}
71+
72+
fn name(&self) -> &'static str {
73+
"Derive"
74+
}
7175
}
7276

7377
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Derive {

clippy_lints/src/doc.rs

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ impl LintPass for Doc {
4848
fn get_lints(&self) -> LintArray {
4949
lint_array![DOC_MARKDOWN]
5050
}
51+
52+
fn name(&self) -> &'static str {
53+
"DocMarkdown"
54+
}
5155
}
5256

5357
impl EarlyLintPass for Doc {

clippy_lints/src/double_comparison.rs

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ impl LintPass for Pass {
3737
fn get_lints(&self) -> LintArray {
3838
lint_array!(DOUBLE_COMPARISONS)
3939
}
40+
41+
fn name(&self) -> &'static str {
42+
"DoubleComparisons"
43+
}
4044
}
4145

4246
impl<'a, 'tcx> Pass {

clippy_lints/src/double_parens.rs

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ impl LintPass for DoubleParens {
2929
fn get_lints(&self) -> LintArray {
3030
lint_array!(DOUBLE_PARENS)
3131
}
32+
33+
fn name(&self) -> &'static str {
34+
"DoubleParens"
35+
}
3236
}
3337

3438
impl EarlyLintPass for DoubleParens {

clippy_lints/src/drop_forget_ref.rs

+4
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ impl LintPass for Pass {
112112
fn get_lints(&self) -> LintArray {
113113
lint_array!(DROP_REF, FORGET_REF, DROP_COPY, FORGET_COPY)
114114
}
115+
116+
fn name(&self) -> &'static str {
117+
"DropForgetRef"
118+
}
115119
}
116120

117121
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {

clippy_lints/src/duration_subsec.rs

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ impl LintPass for DurationSubsec {
3636
fn get_lints(&self) -> LintArray {
3737
lint_array!(DURATION_SUBSEC)
3838
}
39+
40+
fn name(&self) -> &'static str {
41+
"DurationSubsec"
42+
}
3943
}
4044

4145
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DurationSubsec {

clippy_lints/src/else_if_without_else.rs

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ impl LintPass for ElseIfWithoutElse {
4646
fn get_lints(&self) -> LintArray {
4747
lint_array!(ELSE_IF_WITHOUT_ELSE)
4848
}
49+
50+
fn name(&self) -> &'static str {
51+
"ElseIfWithoutElse"
52+
}
4953
}
5054

5155
impl EarlyLintPass for ElseIfWithoutElse {

clippy_lints/src/empty_enum.rs

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ impl LintPass for EmptyEnum {
3030
fn get_lints(&self) -> LintArray {
3131
lint_array!(EMPTY_ENUM)
3232
}
33+
34+
fn name(&self) -> &'static str {
35+
"EmptyEnum"
36+
}
3337
}
3438

3539
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EmptyEnum {

clippy_lints/src/entry.rs

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ impl LintPass for HashMapLint {
4444
fn get_lints(&self) -> LintArray {
4545
lint_array!(MAP_ENTRY)
4646
}
47+
48+
fn name(&self) -> &'static str {
49+
"HashMap"
50+
}
4751
}
4852

4953
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for HashMapLint {

clippy_lints/src/enum_clike.rs

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ impl LintPass for UnportableVariant {
4040
fn get_lints(&self) -> LintArray {
4141
lint_array!(ENUM_CLIKE_UNPORTABLE_VARIANT)
4242
}
43+
44+
fn name(&self) -> &'static str {
45+
"UnportableVariant"
46+
}
4347
}
4448

4549
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {

clippy_lints/src/enum_glob_use.rs

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ impl LintPass for EnumGlobUse {
3232
fn get_lints(&self) -> LintArray {
3333
lint_array!(ENUM_GLOB_USE)
3434
}
35+
36+
fn name(&self) -> &'static str {
37+
"EnumGlobUse"
38+
}
3539
}
3640

3741
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EnumGlobUse {

clippy_lints/src/enum_variants.rs

+4
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ impl LintPass for EnumVariantNames {
124124
MODULE_INCEPTION
125125
)
126126
}
127+
128+
fn name(&self) -> &'static str {
129+
"EnumVariantNames"
130+
}
127131
}
128132

129133
fn var2str(var: &Variant) -> LocalInternedString {

clippy_lints/src/eq_op.rs

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ impl LintPass for EqOp {
5252
fn get_lints(&self) -> LintArray {
5353
lint_array!(EQ_OP, OP_REF)
5454
}
55+
56+
fn name(&self) -> &'static str {
57+
"EqOp"
58+
}
5559
}
5660

5761
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {

clippy_lints/src/erasing_op.rs

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ impl LintPass for ErasingOp {
3232
fn get_lints(&self) -> LintArray {
3333
lint_array!(ERASING_OP)
3434
}
35+
36+
fn name(&self) -> &'static str {
37+
"ErasingOp"
38+
}
3539
}
3640

3741
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ErasingOp {

clippy_lints/src/escape.rs

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ impl LintPass for Pass {
5252
fn get_lints(&self) -> LintArray {
5353
lint_array!(BOXED_LOCAL)
5454
}
55+
56+
fn name(&self) -> &'static str {
57+
"BoxedLocal"
58+
}
5559
}
5660

5761
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {

clippy_lints/src/eta_reduction.rs

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ impl LintPass for EtaPass {
3636
fn get_lints(&self) -> LintArray {
3737
lint_array!(REDUNDANT_CLOSURE)
3838
}
39+
40+
fn name(&self) -> &'static str {
41+
"EtaReduction"
42+
}
3943
}
4044

4145
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EtaPass {

clippy_lints/src/eval_order_dependence.rs

+4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ impl LintPass for EvalOrderDependence {
6161
fn get_lints(&self) -> LintArray {
6262
lint_array!(EVAL_ORDER_DEPENDENCE, DIVERGING_SUB_EXPRESSION)
6363
}
64+
65+
fn name(&self) -> &'static str {
66+
"EvalOrderDependence"
67+
}
6468
}
6569

6670
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EvalOrderDependence {

clippy_lints/src/excessive_precision.rs

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ impl LintPass for ExcessivePrecision {
4141
fn get_lints(&self) -> LintArray {
4242
lint_array!(EXCESSIVE_PRECISION)
4343
}
44+
45+
fn name(&self) -> &'static str {
46+
"ExcessivePrecision"
47+
}
4448
}
4549

4650
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ExcessivePrecision {

0 commit comments

Comments
 (0)