Skip to content

Commit 607a3f6

Browse files
Rename literal_string_with_formatting_arg into literal_string_with_formatting_args
1 parent b20b75a commit 607a3f6

17 files changed

+42
-42
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5639,7 +5639,7 @@ Released 2018-09-13
56395639
[`lines_filter_map_ok`]: https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok
56405640
[`linkedlist`]: https://rust-lang.github.io/rust-clippy/master/index.html#linkedlist
56415641
[`lint_groups_priority`]: https://rust-lang.github.io/rust-clippy/master/index.html#lint_groups_priority
5642-
[`literal_string_with_formatting_arg`]: https://rust-lang.github.io/rust-clippy/master/index.html#literal_string_with_formatting_arg
5642+
[`literal_string_with_formatting_args`]: https://rust-lang.github.io/rust-clippy/master/index.html#literal_string_with_formatting_args
56435643
[`little_endian_bytes`]: https://rust-lang.github.io/rust-clippy/master/index.html#little_endian_bytes
56445644
[`logic_bug`]: https://rust-lang.github.io/rust-clippy/master/index.html#logic_bug
56455645
[`lossy_float_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#lossy_float_literal

clippy_dev/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
unused_lifetimes,
88
unused_qualifications
99
)]
10-
#![allow(clippy::missing_panics_doc, clippy::literal_string_with_formatting_arg)]
10+
#![allow(clippy::missing_panics_doc)]
1111

1212
// The `rustc_driver` crate seems to be required in order to use the `rust_lexer` crate.
1313
#[allow(unused_extern_crates)]

clippy_lints/src/declared_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ pub static LINTS: &[&crate::LintInfo] = &[
276276
crate::literal_representation::MISTYPED_LITERAL_SUFFIXES_INFO,
277277
crate::literal_representation::UNREADABLE_LITERAL_INFO,
278278
crate::literal_representation::UNUSUAL_BYTE_GROUPINGS_INFO,
279-
crate::literal_string_with_formatting_arg::LITERAL_STRING_WITH_FORMATTING_ARG_INFO,
279+
crate::literal_string_with_formatting_args::LITERAL_STRING_WITH_FORMATTING_ARGS_INFO,
280280
crate::loops::EMPTY_LOOP_INFO,
281281
crate::loops::EXPLICIT_COUNTER_LOOP_INFO,
282282
crate::loops::EXPLICIT_INTO_ITER_LOOP_INFO,

clippy_lints/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
clippy::must_use_candidate,
1919
rustc::diagnostic_outside_of_impl,
2020
rustc::untranslatable_diagnostic,
21-
clippy::literal_string_with_formatting_arg
21+
clippy::literal_string_with_formatting_args
2222
)]
2323
#![warn(
2424
trivial_casts,
@@ -198,7 +198,7 @@ mod let_with_type_underscore;
198198
mod lifetimes;
199199
mod lines_filter_map_ok;
200200
mod literal_representation;
201-
mod literal_string_with_formatting_arg;
201+
mod literal_string_with_formatting_args;
202202
mod loops;
203203
mod macro_metavars_in_unsafe;
204204
mod macro_use;
@@ -962,7 +962,7 @@ pub fn register_lints(store: &mut rustc_lint::LintStore, conf: &'static Conf) {
962962
store.register_late_pass(move |_| Box::new(manual_div_ceil::ManualDivCeil::new(conf)));
963963
store.register_late_pass(|_| Box::new(manual_is_power_of_two::ManualIsPowerOfTwo));
964964
store.register_late_pass(|_| Box::new(non_zero_suggestions::NonZeroSuggestions));
965-
store.register_early_pass(|| Box::new(literal_string_with_formatting_arg::LiteralStringWithFormattingArg));
965+
store.register_early_pass(|| Box::new(literal_string_with_formatting_args::LiteralStringWithFormattingArg));
966966
store.register_late_pass(move |_| Box::new(unused_trait_names::UnusedTraitNames::new(conf)));
967967
store.register_late_pass(|_| Box::new(manual_ignore_case_cmp::ManualIgnoreCaseCmp));
968968
store.register_late_pass(|_| Box::new(unnecessary_literal_bound::UnnecessaryLiteralBound));

clippy_lints/src/literal_string_with_formatting_arg.rs renamed to clippy_lints/src/literal_string_with_formatting_args.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ declare_clippy_lint! {
2828
/// x.expect(&format!("{y:?}"));
2929
/// ```
3030
#[clippy::version = "1.83.0"]
31-
pub LITERAL_STRING_WITH_FORMATTING_ARG,
31+
pub LITERAL_STRING_WITH_FORMATTING_ARGS,
3232
suspicious,
3333
"Checks if string literals have formatting arguments"
3434
}
3535

36-
declare_lint_pass!(LiteralStringWithFormattingArg => [LITERAL_STRING_WITH_FORMATTING_ARG]);
36+
declare_lint_pass!(LiteralStringWithFormattingArg => [LITERAL_STRING_WITH_FORMATTING_ARGS]);
3737

3838
impl EarlyLintPass for LiteralStringWithFormattingArg {
3939
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) {
@@ -94,15 +94,15 @@ impl EarlyLintPass for LiteralStringWithFormattingArg {
9494
1 => {
9595
span_lint(
9696
cx,
97-
LITERAL_STRING_WITH_FORMATTING_ARG,
97+
LITERAL_STRING_WITH_FORMATTING_ARGS,
9898
spans,
9999
"this looks like a formatting argument but it is not part of a formatting macro",
100100
);
101101
},
102102
_ => {
103103
span_lint(
104104
cx,
105-
LITERAL_STRING_WITH_FORMATTING_ARG,
105+
LITERAL_STRING_WITH_FORMATTING_ARGS,
106106
spans,
107107
"these look like formatting arguments but are not part of a formatting macro",
108108
);

tests/ui-toml/large_include_file/large_include_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(clippy::large_include_file)]
2-
#![allow(clippy::literal_string_with_formatting_arg)]
2+
#![allow(clippy::literal_string_with_formatting_args)]
33

44
// Good
55
const GOOD_INCLUDE_BYTES: &[u8; 68] = include_bytes!("../../ui/author.rs");

tests/ui/auxiliary/proc_macro_derive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(incomplete_features)]
33
#![allow(clippy::field_reassign_with_default)]
44
#![allow(clippy::eq_op)]
5-
#![allow(clippy::literal_string_with_formatting_arg)]
5+
#![allow(clippy::literal_string_with_formatting_args)]
66

77
extern crate proc_macro;
88

tests/ui/format.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
clippy::uninlined_format_args,
88
clippy::needless_raw_string_hashes,
99
clippy::useless_vec,
10-
clippy::literal_string_with_formatting_arg
10+
clippy::literal_string_with_formatting_args
1111
)]
1212

1313
struct Foo(pub String);

tests/ui/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
clippy::uninlined_format_args,
88
clippy::needless_raw_string_hashes,
99
clippy::useless_vec,
10-
clippy::literal_string_with_formatting_arg
10+
clippy::literal_string_with_formatting_args
1111
)]
1212

1313
struct Foo(pub String);

tests/ui/literal_string_with_formatting_arg.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
#![warn(clippy::literal_string_with_formatting_arg)]
1+
#![warn(clippy::literal_string_with_formatting_args)]
22
#![allow(clippy::unnecessary_literal_unwrap)]
33

44
fn main() {
55
let x: Option<usize> = None;
66
let y = "hello";
7-
x.expect("{y} {}"); //~ literal_string_with_formatting_arg
8-
x.expect(" {y} bla"); //~ literal_string_with_formatting_arg
9-
x.expect("{:?}"); //~ literal_string_with_formatting_arg
10-
x.expect("{y:?}"); //~ literal_string_with_formatting_arg
11-
x.expect(" {y:?} {y:?} "); //~ literal_string_with_formatting_arg
12-
x.expect(" {y:..} {y:?} "); //~ literal_string_with_formatting_arg
13-
x.expect(r"{y:?} {y:?} "); //~ literal_string_with_formatting_arg
14-
x.expect(r"{y:?} y:?}"); //~ literal_string_with_formatting_arg
15-
x.expect(r##" {y:?} {y:?} "##); //~ literal_string_with_formatting_arg
7+
x.expect("{y} {}"); //~ literal_string_with_formatting_args
8+
x.expect(" {y} bla"); //~ literal_string_with_formatting_args
9+
x.expect("{:?}"); //~ literal_string_with_formatting_args
10+
x.expect("{y:?}"); //~ literal_string_with_formatting_args
11+
x.expect(" {y:?} {y:?} "); //~ literal_string_with_formatting_args
12+
x.expect(" {y:..} {y:?} "); //~ literal_string_with_formatting_args
13+
x.expect(r"{y:?} {y:?} "); //~ literal_string_with_formatting_args
14+
x.expect(r"{y:?} y:?}"); //~ literal_string_with_formatting_args
15+
x.expect(r##" {y:?} {y:?} "##); //~ literal_string_with_formatting_args
1616
// Ensure that it doesn't try to go in the middle of a unicode character.
17-
x.expect("———{:?}"); //~ literal_string_with_formatting_arg
17+
x.expect("———{:?}"); //~ literal_string_with_formatting_args
1818

1919
// Should not lint!
2020
format!("{y:?}");

0 commit comments

Comments
 (0)