File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff 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 ( ) ;
You can’t perform that action at this time.
0 commit comments