diff options
| author | Klaus Purer <klaus.purer@gmail.com> | 2018-12-16 14:10:53 +0100 |
|---|---|---|
| committer | Klaus Purer <klaus.purer@gmail.com> | 2018-12-16 14:10:53 +0100 |
| commit | 15b9e9f23a3e10ca9cf2364f47ae8e1910df6eff (patch) | |
| tree | 9d3d876ece2062d5acd712b73198fd638385fa5a | |
| parent | a416c5e0f7c4c9473069a58410d3ec3e86b1ac0d (diff) | |
| download | rust-15b9e9f23a3e10ca9cf2364f47ae8e1910df6eff.tar.gz rust-15b9e9f23a3e10ca9cf2364f47ae8e1910df6eff.zip | |
chore(moduel_name_repeat): Rename stutter lint to module_name_repeat to avoid ableist language
| -rw-r--r-- | clippy_lints/src/enum_variants.rs | 8 | ||||
| -rw-r--r-- | clippy_lints/src/lib.rs | 2 | ||||
| -rw-r--r-- | tests/ui/module_name_repeat.rs (renamed from tests/ui/stutter.rs) | 2 | ||||
| -rw-r--r-- | tests/ui/module_name_repeat.stderr (renamed from tests/ui/stutter.stderr) | 12 |
4 files changed, 12 insertions, 12 deletions
diff --git a/clippy_lints/src/enum_variants.rs b/clippy_lints/src/enum_variants.rs index ae87c4273e9..861e1177296 100644 --- a/clippy_lints/src/enum_variants.rs +++ b/clippy_lints/src/enum_variants.rs @@ -75,7 +75,7 @@ declare_clippy_lint! { /// } /// ``` declare_clippy_lint! { - pub STUTTER, + pub MODULE_NAME_REPEAT, pedantic, "type names prefixed/postfixed with their containing module's name" } @@ -126,7 +126,7 @@ impl EnumVariantNames { impl LintPass for EnumVariantNames { fn get_lints(&self) -> LintArray { - lint_array!(ENUM_VARIANT_NAMES, PUB_ENUM_VARIANT_NAMES, STUTTER, MODULE_INCEPTION) + lint_array!(ENUM_VARIANT_NAMES, PUB_ENUM_VARIANT_NAMES, MODULE_NAME_REPEAT, MODULE_INCEPTION) } } @@ -277,7 +277,7 @@ impl EarlyLintPass for EnumVariantNames { match item_camel.chars().nth(nchars) { Some(c) if is_word_beginning(c) => span_lint( cx, - STUTTER, + MODULE_NAME_REPEAT, item.span, "item name starts with its containing module's name", ), @@ -287,7 +287,7 @@ impl EarlyLintPass for EnumVariantNames { if rmatching == nchars { span_lint( cx, - STUTTER, + MODULE_NAME_REPEAT, item.span, "item name ends with its containing module's name", ); diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index f4b5edee84c..1abca1751e8 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -518,7 +518,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) { empty_enum::EMPTY_ENUM, enum_glob_use::ENUM_GLOB_USE, enum_variants::PUB_ENUM_VARIANT_NAMES, - enum_variants::STUTTER, + enum_variants::MODULE_NAME_REPEAT, if_not_else::IF_NOT_ELSE, infinite_iter::MAYBE_INFINITE_ITER, items_after_statements::ITEMS_AFTER_STATEMENTS, diff --git a/tests/ui/stutter.rs b/tests/ui/module_name_repeat.rs index 922487d671d..a302eaacccf 100644 --- a/tests/ui/stutter.rs +++ b/tests/ui/module_name_repeat.rs @@ -7,7 +7,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![warn(clippy::stutter)] +#![warn(clippy::module_name_repeat)] #![allow(dead_code)] mod foo { diff --git a/tests/ui/stutter.stderr b/tests/ui/module_name_repeat.stderr index 8c2d1d43281..9547fa9fdd6 100644 --- a/tests/ui/stutter.stderr +++ b/tests/ui/module_name_repeat.stderr @@ -1,31 +1,31 @@ error: item name starts with its containing module's name - --> $DIR/stutter.rs:15:5 + --> $DIR/module_name_repeat.rs:15:5 | 15 | pub fn foo_bar() {} | ^^^^^^^^^^^^^^^^^^^ | - = note: `-D clippy::stutter` implied by `-D warnings` + = note: `-D clippy::module-name-repeat` implied by `-D warnings` error: item name ends with its containing module's name - --> $DIR/stutter.rs:16:5 + --> $DIR/module_name_repeat.rs:16:5 | 16 | pub fn bar_foo() {} | ^^^^^^^^^^^^^^^^^^^ error: item name starts with its containing module's name - --> $DIR/stutter.rs:17:5 + --> $DIR/module_name_repeat.rs:17:5 | 17 | pub struct FooCake {} | ^^^^^^^^^^^^^^^^^^^^^ error: item name ends with its containing module's name - --> $DIR/stutter.rs:18:5 + --> $DIR/module_name_repeat.rs:18:5 | 18 | pub enum CakeFoo {} | ^^^^^^^^^^^^^^^^^^^ error: item name starts with its containing module's name - --> $DIR/stutter.rs:19:5 + --> $DIR/module_name_repeat.rs:19:5 | 19 | pub struct Foo7Bar; | ^^^^^^^^^^^^^^^^^^^ |
