Skip to content

Commit 952b731

Browse files
committed
Reword bitrotten comment
1 parent a83eb7c commit 952b731

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/driver.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,11 @@ pub fn main() {
293293
.chain(vec!["--cfg".into(), r#"feature="cargo-clippy""#.into()])
294294
.collect::<Vec<String>>();
295295

296-
// this check ensures that dependencies are built but not linted and the final
297-
// crate is linted but not built
296+
// We enable Clippy if one of the following conditions is met
297+
// - IF Clippy is run on its test suite OR
298+
// - IF Clippy is run on the main crate, not on deps (`!cap_lints_allow`) THEN
299+
// - IF `--no-deps` is not set (`!no_deps`) OR
300+
// - IF `--no-deps` is set and Clippy is run on the specified primary package
298301
let clippy_tests_set = env::var("CLIPPY_TESTS").map_or(false, |val| val == "true");
299302
let cap_lints_allow = arg_value(&orig_args, "--cap-lints", |val| val == "allow").is_some();
300303
let in_primary_package = env::var("CARGO_PRIMARY_PACKAGE").is_ok();

0 commit comments

Comments
 (0)