Skip to content

Commit 4b9cb85

Browse files
committed
Rename lint
1 parent d65c9a5 commit 4b9cb85

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4382,7 +4382,7 @@ Released 2018-09-13
43824382
<!-- begin autogenerated links to lint list -->
43834383
[`absurd_extreme_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons
43844384
[`alloc_instead_of_core`]: https://rust-lang.github.io/rust-clippy/master/index.html#alloc_instead_of_core
4385-
[`allow_attribute`]: https://rust-lang.github.io/rust-clippy/master/index.html#allow_attribute
4385+
[`allow_attributes`]: https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes
43864386
[`allow_attributes_without_reason`]: https://rust-lang.github.io/rust-clippy/master/index.html#allow_attributes_without_reason
43874387
[`almost_complete_letter_range`]: https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_letter_range
43884388
[`almost_complete_range`]: https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_range

clippy_lints/src/allow_attribute.rs renamed to clippy_lints/src/allow_attributes.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ declare_clippy_lint! {
4040
/// }
4141
/// ```
4242
#[clippy::version = "1.69.0"]
43-
pub ALLOW_ATTRIBUTE,
43+
pub ALLOW_ATTRIBUTES,
4444
restriction,
4545
"`#[allow]` will not trigger if a warning isn't found. `#[expect]` triggers if there are no warnings."
4646
}
4747

48-
declare_lint_pass!(AllowAttribute => [ALLOW_ATTRIBUTE]);
48+
declare_lint_pass!(AllowAttribute => [ALLOW_ATTRIBUTES]);
4949

5050
impl LateLintPass<'_> for AllowAttribute {
5151
// Separate each crate's features.
@@ -58,7 +58,7 @@ impl LateLintPass<'_> for AllowAttribute {
5858
then {
5959
span_lint_and_sugg(
6060
cx,
61-
ALLOW_ATTRIBUTE,
61+
ALLOW_ATTRIBUTES,
6262
ident.span,
6363
"#[allow] attribute found",
6464
"replace it with", "expect".into()

clippy_lints/src/declared_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
3535
crate::utils::internal_lints::produce_ice::PRODUCE_ICE_INFO,
3636
#[cfg(feature = "internal")]
3737
crate::utils::internal_lints::unnecessary_def_path::UNNECESSARY_DEF_PATH_INFO,
38-
crate::allow_attribute::ALLOW_ATTRIBUTE_INFO,
38+
crate::allow_attributes::ALLOW_ATTRIBUTES_INFO,
3939
crate::almost_complete_range::ALMOST_COMPLETE_RANGE_INFO,
4040
crate::approx_const::APPROX_CONSTANT_INFO,
4141
crate::as_conversions::AS_CONVERSIONS_INFO,

clippy_lints/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ mod declared_lints;
6767
mod renamed_lints;
6868

6969
// begin lints modules, do not remove this comment, it’s used in `update_lints`
70-
mod allow_attribute;
70+
mod allow_attributes;
7171
mod almost_complete_range;
7272
mod approx_const;
7373
mod as_conversions;
@@ -934,7 +934,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
934934
store.register_late_pass(|_| Box::new(missing_assert_message::MissingAssertMessage));
935935
store.register_early_pass(|| Box::new(redundant_async_block::RedundantAsyncBlock));
936936
store.register_late_pass(|_| Box::new(let_with_type_underscore::UnderscoreTyped));
937-
store.register_late_pass(|_| Box::new(allow_attribute::AllowAttribute));
937+
store.register_late_pass(|_| Box::new(allow_attributes::AllowAttribute));
938938
// add lints here, do not remove this comment, it's used in `new_lint`
939939
}
940940

tests/ui/allow_attribute.fixed renamed to tests/ui/allow_attributes.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-rustfix
22
#![allow(unused)]
3-
#![warn(clippy::allow_attribute)]
3+
#![warn(clippy::allow_attributes)]
44
#![feature(lint_reasons)]
55

66
fn main() {}

tests/ui/allow_attribute.rs renamed to tests/ui/allow_attributes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-rustfix
22
#![allow(unused)]
3-
#![warn(clippy::allow_attribute)]
3+
#![warn(clippy::allow_attributes)]
44
#![feature(lint_reasons)]
55

66
fn main() {}

tests/ui/allow_attribute.stderr renamed to tests/ui/allow_attributes.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: #[allow] attribute found
2-
--> $DIR/allow_attribute.rs:11:3
2+
--> $DIR/allow_attributes.rs:11:3
33
|
44
LL | #[allow(dead_code)]
55
| ^^^^^ help: replace it with: `expect`
66
|
7-
= note: `-D clippy::allow-attribute` implied by `-D warnings`
7+
= note: `-D clippy::allow-attributes` implied by `-D warnings`
88

99
error: #[allow] attribute found
10-
--> $DIR/allow_attribute.rs:20:30
10+
--> $DIR/allow_attributes.rs:20:30
1111
|
1212
LL | #[cfg_attr(panic = "unwind", allow(dead_code))]
1313
| ^^^^^ help: replace it with: `expect`

0 commit comments

Comments
 (0)