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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 8 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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 {

0 commit comments

Comments
 (0)