about summary refs log tree commit diff
diff options
context:
space:
mode:
authorblyxyas <blyxyas@gmail.com>2023-03-15 23:18:25 +0100
committerblyxyas <blyxyas@gmail.com>2023-03-15 23:18:25 +0100
commit4b9cb857f9b6da4e3b274601a6c439aac8a2c425 (patch)
tree6252b4b24df631828aa6f8fd583ae271feb36829
parentd65c9a5700454ab2a3bd81dccff610ad13855d14 (diff)
downloadrust-4b9cb857f9b6da4e3b274601a6c439aac8a2c425.tar.gz
rust-4b9cb857f9b6da4e3b274601a6c439aac8a2c425.zip
Rename lint
-rw-r--r--CHANGELOG.md2
-rw-r--r--clippy_lints/src/allow_attributes.rs (renamed from clippy_lints/src/allow_attribute.rs)6
-rw-r--r--clippy_lints/src/declared_lints.rs2
-rw-r--r--clippy_lints/src/lib.rs4
-rw-r--r--tests/ui/allow_attributes.fixed (renamed from tests/ui/allow_attribute.fixed)2
-rw-r--r--tests/ui/allow_attributes.rs (renamed from tests/ui/allow_attribute.rs)2
-rw-r--r--tests/ui/allow_attributes.stderr (renamed from tests/ui/allow_attribute.stderr)6
7 files changed, 12 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2b00fd962ca..c090a844858 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4382,7 +4382,7 @@ Released 2018-09-13
 <!-- begin autogenerated links to lint list -->
 [`absurd_extreme_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons
 [`alloc_instead_of_core`]: https://rust-lang.github.io/rust-clippy/master/index.html#alloc_instead_of_core
-[`allow_attribute`]: https://rust-lang.github.io/rust-clippy/master/index.html#allow_attribute
+[`allow_attributes`]: https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes
 [`allow_attributes_without_reason`]: https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes_without_reason
 [`almost_complete_letter_range`]: https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_letter_range
 [`almost_complete_range`]: https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_range
diff --git a/clippy_lints/src/allow_attribute.rs b/clippy_lints/src/allow_attributes.rs
index 28fc45d0554..3d660a11ea3 100644
--- a/clippy_lints/src/allow_attribute.rs
+++ b/clippy_lints/src/allow_attributes.rs
@@ -40,12 +40,12 @@ declare_clippy_lint! {
     /// }
     /// ```
     #[clippy::version = "1.69.0"]
-    pub ALLOW_ATTRIBUTE,
+    pub ALLOW_ATTRIBUTES,
     restriction,
     "`#[allow]` will not trigger if a warning isn't found. `#[expect]` triggers if there are no warnings."
 }
 
-declare_lint_pass!(AllowAttribute => [ALLOW_ATTRIBUTE]);
+declare_lint_pass!(AllowAttribute => [ALLOW_ATTRIBUTES]);
 
 impl LateLintPass<'_> for AllowAttribute {
     // Separate each crate's features.
@@ -58,7 +58,7 @@ impl LateLintPass<'_> for AllowAttribute {
             then {
                 span_lint_and_sugg(
                     cx,
-                    ALLOW_ATTRIBUTE,
+                    ALLOW_ATTRIBUTES,
                     ident.span,
                     "#[allow] attribute found",
                     "replace it with", "expect".into()
diff --git a/clippy_lints/src/declared_lints.rs b/clippy_lints/src/declared_lints.rs
index 73f74d59f4a..25f15973490 100644
--- a/clippy_lints/src/declared_lints.rs
+++ b/clippy_lints/src/declared_lints.rs
@@ -35,7 +35,7 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
     crate::utils::internal_lints::produce_ice::PRODUCE_ICE_INFO,
     #[cfg(feature = "internal")]
     crate::utils::internal_lints::unnecessary_def_path::UNNECESSARY_DEF_PATH_INFO,
-    crate::allow_attribute::ALLOW_ATTRIBUTE_INFO,
+    crate::allow_attributes::ALLOW_ATTRIBUTES_INFO,
     crate::almost_complete_range::ALMOST_COMPLETE_RANGE_INFO,
     crate::approx_const::APPROX_CONSTANT_INFO,
     crate::as_conversions::AS_CONVERSIONS_INFO,
diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs
index a3c65a69c99..c455c3e3058 100644
--- a/clippy_lints/src/lib.rs
+++ b/clippy_lints/src/lib.rs
@@ -67,7 +67,7 @@ mod declared_lints;
 mod renamed_lints;
 
 // begin lints modules, do not remove this comment, it’s used in `update_lints`
-mod allow_attribute;
+mod allow_attributes;
 mod almost_complete_range;
 mod approx_const;
 mod as_conversions;
@@ -934,7 +934,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
     store.register_late_pass(|_| Box::new(missing_assert_message::MissingAssertMessage));
     store.register_early_pass(|| Box::new(redundant_async_block::RedundantAsyncBlock));
     store.register_late_pass(|_| Box::new(let_with_type_underscore::UnderscoreTyped));
-    store.register_late_pass(|_| Box::new(allow_attribute::AllowAttribute));
+    store.register_late_pass(|_| Box::new(allow_attributes::AllowAttribute));
     // add lints here, do not remove this comment, it's used in `new_lint`
 }
 
diff --git a/tests/ui/allow_attribute.fixed b/tests/ui/allow_attributes.fixed
index 01759ced09d..b8dd0619e6d 100644
--- a/tests/ui/allow_attribute.fixed
+++ b/tests/ui/allow_attributes.fixed
@@ -1,6 +1,6 @@
 // run-rustfix
 #![allow(unused)]
-#![warn(clippy::allow_attribute)]
+#![warn(clippy::allow_attributes)]
 #![feature(lint_reasons)]
 
 fn main() {}
diff --git a/tests/ui/allow_attribute.rs b/tests/ui/allow_attributes.rs
index b8e341fe9e4..295f560906a 100644
--- a/tests/ui/allow_attribute.rs
+++ b/tests/ui/allow_attributes.rs
@@ -1,6 +1,6 @@
 // run-rustfix
 #![allow(unused)]
-#![warn(clippy::allow_attribute)]
+#![warn(clippy::allow_attributes)]
 #![feature(lint_reasons)]
 
 fn main() {}
diff --git a/tests/ui/allow_attribute.stderr b/tests/ui/allow_attributes.stderr
index 58b7323b068..681837e9ed7 100644
--- a/tests/ui/allow_attribute.stderr
+++ b/tests/ui/allow_attributes.stderr
@@ -1,13 +1,13 @@
 error: #[allow] attribute found
-  --> $DIR/allow_attribute.rs:11:3
+  --> $DIR/allow_attributes.rs:11:3
    |
 LL | #[allow(dead_code)]
    |   ^^^^^ help: replace it with: `expect`
    |
-   = note: `-D clippy::allow-attribute` implied by `-D warnings`
+   = note: `-D clippy::allow-attributes` implied by `-D warnings`
 
 error: #[allow] attribute found
-  --> $DIR/allow_attribute.rs:20:30
+  --> $DIR/allow_attributes.rs:20:30
    |
 LL | #[cfg_attr(panic = "unwind", allow(dead_code))]
    |                              ^^^^^ help: replace it with: `expect`