Skip to content

Commit b9e3b07

Browse files
committed
use --cap-lints only when deny and forbid rules are not specified
Signed-off-by: onur-ozkan <[email protected]>
1 parent cfb8c65 commit b9e3b07

File tree

1 file changed

+7
-2
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+7
-2
lines changed

src/bootstrap/src/core/build_steps/check.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,15 @@ fn args(builder: &Builder<'_>) -> Vec<String> {
6161
}
6262
}
6363

64-
let all_args = std::env::args().collect::<Vec<_>>();
64+
args.extend(strings(&["--"]));
65+
66+
if deny.is_empty() && forbid.is_empty() {
67+
args.extend(strings(&["--cap-lints", "warn"]));
68+
}
6569

66-
args.extend(strings(&["--", "--cap-lints", "warn"]));
70+
let all_args = std::env::args().collect::<Vec<_>>();
6771
args.extend(get_clippy_rules_in_order(&all_args, allow, deny, warn, forbid));
72+
6873
args.extend(ignored_lints.iter().map(|lint| format!("-Aclippy::{}", lint)));
6974
args.extend(builder.config.free_args.clone());
7075
args

0 commit comments

Comments
 (0)