Skip to content

Commit 15b9e9f

Browse files
committed
chore(moduel_name_repeat): Rename stutter lint to module_name_repeat to avoid ableist language
1 parent a416c5e commit 15b9e9f

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

clippy_lints/src/enum_variants.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ declare_clippy_lint! {
7575
/// }
7676
/// ```
7777
declare_clippy_lint! {
78-
pub STUTTER,
78+
pub MODULE_NAME_REPEAT,
7979
pedantic,
8080
"type names prefixed/postfixed with their containing module's name"
8181
}
@@ -126,7 +126,7 @@ impl EnumVariantNames {
126126

127127
impl LintPass for EnumVariantNames {
128128
fn get_lints(&self) -> LintArray {
129-
lint_array!(ENUM_VARIANT_NAMES, PUB_ENUM_VARIANT_NAMES, STUTTER, MODULE_INCEPTION)
129+
lint_array!(ENUM_VARIANT_NAMES, PUB_ENUM_VARIANT_NAMES, MODULE_NAME_REPEAT, MODULE_INCEPTION)
130130
}
131131
}
132132

@@ -277,7 +277,7 @@ impl EarlyLintPass for EnumVariantNames {
277277
match item_camel.chars().nth(nchars) {
278278
Some(c) if is_word_beginning(c) => span_lint(
279279
cx,
280-
STUTTER,
280+
MODULE_NAME_REPEAT,
281281
item.span,
282282
"item name starts with its containing module's name",
283283
),
@@ -287,7 +287,7 @@ impl EarlyLintPass for EnumVariantNames {
287287
if rmatching == nchars {
288288
span_lint(
289289
cx,
290-
STUTTER,
290+
MODULE_NAME_REPEAT,
291291
item.span,
292292
"item name ends with its containing module's name",
293293
);

clippy_lints/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
518518
empty_enum::EMPTY_ENUM,
519519
enum_glob_use::ENUM_GLOB_USE,
520520
enum_variants::PUB_ENUM_VARIANT_NAMES,
521-
enum_variants::STUTTER,
521+
enum_variants::MODULE_NAME_REPEAT,
522522
if_not_else::IF_NOT_ELSE,
523523
infinite_iter::MAYBE_INFINITE_ITER,
524524
items_after_statements::ITEMS_AFTER_STATEMENTS,

tests/ui/stutter.rs renamed to tests/ui/module_name_repeat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10-
#![warn(clippy::stutter)]
10+
#![warn(clippy::module_name_repeat)]
1111
#![allow(dead_code)]
1212

1313
mod foo {

tests/ui/stutter.stderr renamed to tests/ui/module_name_repeat.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
error: item name starts with its containing module's name
2-
--> $DIR/stutter.rs:15:5
2+
--> $DIR/module_name_repeat.rs:15:5
33
|
44
15 | pub fn foo_bar() {}
55
| ^^^^^^^^^^^^^^^^^^^
66
|
7-
= note: `-D clippy::stutter` implied by `-D warnings`
7+
= note: `-D clippy::module-name-repeat` implied by `-D warnings`
88

99
error: item name ends with its containing module's name
10-
--> $DIR/stutter.rs:16:5
10+
--> $DIR/module_name_repeat.rs:16:5
1111
|
1212
16 | pub fn bar_foo() {}
1313
| ^^^^^^^^^^^^^^^^^^^
1414

1515
error: item name starts with its containing module's name
16-
--> $DIR/stutter.rs:17:5
16+
--> $DIR/module_name_repeat.rs:17:5
1717
|
1818
17 | pub struct FooCake {}
1919
| ^^^^^^^^^^^^^^^^^^^^^
2020

2121
error: item name ends with its containing module's name
22-
--> $DIR/stutter.rs:18:5
22+
--> $DIR/module_name_repeat.rs:18:5
2323
|
2424
18 | pub enum CakeFoo {}
2525
| ^^^^^^^^^^^^^^^^^^^
2626

2727
error: item name starts with its containing module's name
28-
--> $DIR/stutter.rs:19:5
28+
--> $DIR/module_name_repeat.rs:19:5
2929
|
3030
19 | pub struct Foo7Bar;
3131
| ^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)