about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEduardo Broto <ebroto@tutanota.com>2020-11-27 18:04:30 +0100
committerEduardo Broto <ebroto@tutanota.com>2020-11-27 18:04:30 +0100
commit952b731fb9134e44e4c99bae46e6a917c944e77e (patch)
tree0717214b5a1c98cf4311e1c57fb191f927b00676 /src
parenta83eb7ca994a0d0a169ba0120e4f1da63422c517 (diff)
downloadrust-952b731fb9134e44e4c99bae46e6a917c944e77e.tar.gz
rust-952b731fb9134e44e4c99bae46e6a917c944e77e.zip
Reword bitrotten comment
Diffstat (limited to 'src')
-rw-r--r--src/driver.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/driver.rs b/src/driver.rs
index 03381106de1..e490ee54c0b 100644
--- a/src/driver.rs
+++ b/src/driver.rs
@@ -293,8 +293,11 @@ pub fn main() {
             .chain(vec!["--cfg".into(), r#"feature="cargo-clippy""#.into()])
             .collect::<Vec<String>>();
 
-        // this check ensures that dependencies are built but not linted and the final
-        // crate is linted but not built
+        // We enable Clippy if one of the following conditions is met
+        // - IF Clippy is run on its test suite OR
+        // - IF Clippy is run on the main crate, not on deps (`!cap_lints_allow`) THEN
+        //    - IF `--no-deps` is not set (`!no_deps`) OR
+        //    - IF `--no-deps` is set and Clippy is run on the specified primary package
         let clippy_tests_set = env::var("CLIPPY_TESTS").map_or(false, |val| val == "true");
         let cap_lints_allow = arg_value(&orig_args, "--cap-lints", |val| val == "allow").is_some();
         let in_primary_package = env::var("CARGO_PRIMARY_PACKAGE").is_ok();