Commit 952b731 1 parent a83eb7c commit 952b731 Copy full SHA for 952b731
File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -293,8 +293,11 @@ pub fn main() {
293
293
. chain ( vec ! [ "--cfg" . into( ) , r#"feature="cargo-clippy""# . into( ) ] )
294
294
. collect :: < Vec < String > > ( ) ;
295
295
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
298
301
let clippy_tests_set = env:: var ( "CLIPPY_TESTS" ) . map_or ( false , |val| val == "true" ) ;
299
302
let cap_lints_allow = arg_value ( & orig_args, "--cap-lints" , |val| val == "allow" ) . is_some ( ) ;
300
303
let in_primary_package = env:: var ( "CARGO_PRIMARY_PACKAGE" ) . is_ok ( ) ;
You can’t perform that action at this time.
0 commit comments