Skip to content

Commit 6a4b24e

Browse files
committed
./x.py clippy: allow the most noisy lints
This silences the following clippy lints in ./x.py clippy: many_single_char_names (there are a lot of warnings caused by stdarch) collapsible_if (can reduce readability) type_complexity missing_safety_doc (there are almost 3K warnings issued) too_many_arguments needless_lifetimes (people want 'tcx lifetimes etc) wrong_self_convention (warns about from_..(), to_..(), into_..().. fns that do or do not take self by reference.
1 parent 8018418 commit 6a4b24e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/bootstrap/check.rs

+11
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ fn args(builder: &Builder<'_>) -> Vec<String> {
2121
}
2222

2323
if let Subcommand::Clippy { fix, .. } = builder.config.cmd {
24+
// disable the most spammy clippy lints
25+
let ignored_lints = vec![
26+
"many_single_char_names", // there are a lot in stdarch
27+
"collapsible_if",
28+
"type_complexity",
29+
"missing_safety_doc", // almost 3K warnings
30+
"too_many_arguments",
31+
"needless_lifetimes", // people want to keep the lifetimes
32+
"wrong_self_convention",
33+
];
2434
let mut args = vec![];
2535
if fix {
2636
#[rustfmt::skip]
@@ -33,6 +43,7 @@ fn args(builder: &Builder<'_>) -> Vec<String> {
3343
]));
3444
}
3545
args.extend(strings(&["--", "--cap-lints", "warn"]));
46+
args.extend(ignored_lints.iter().map(|lint| format!("-Aclippy::{}", lint)));
3647
args
3748
} else {
3849
vec![]

0 commit comments

Comments
 (0)