Skip to content

Commit 1a2e189

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

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
@@ -63,10 +63,15 @@ fn args(builder: &Builder<'_>) -> Vec<String> {
6363
}
6464
}
6565

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

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

0 commit comments

Comments
 (0)