File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,14 @@ fn dogfood() {
19
19
return ;
20
20
}
21
21
let root_dir = std:: path:: PathBuf :: from ( env ! ( "CARGO_MANIFEST_DIR" ) ) ;
22
- let clippy_cmd = std:: path:: Path :: new ( & root_dir) . join ( "target/debug/cargo-clippy" ) ;
22
+ let clippy_cmd = std:: path:: Path :: new ( & root_dir)
23
+ . join ( "target" )
24
+ . join ( env ! ( "PROFILE" ) )
25
+ . join ( "cargo-clippy" ) ;
23
26
24
27
std:: env:: set_current_dir ( root_dir) . unwrap ( ) ;
25
28
let output = std:: process:: Command :: new ( clippy_cmd)
29
+ . env ( "CLIPPY_DOGFOOD" , "1" )
26
30
. arg ( "clippy" )
27
31
. arg ( "--all-targets" )
28
32
. arg ( "--all-features" )
@@ -44,6 +48,10 @@ fn dogfood_tests() {
44
48
return ;
45
49
}
46
50
let root_dir = std:: path:: PathBuf :: from ( env ! ( "CARGO_MANIFEST_DIR" ) ) ;
51
+ let clippy_cmd = std:: path:: Path :: new ( & root_dir)
52
+ . join ( "target" )
53
+ . join ( env ! ( "PROFILE" ) )
54
+ . join ( "cargo-clippy" ) ;
47
55
48
56
for d in & [
49
57
"clippy_workspace_tests" ,
@@ -53,10 +61,9 @@ fn dogfood_tests() {
53
61
"clippy_dev" ,
54
62
"rustc_tools_util" ,
55
63
] {
56
- let clippy_cmd = std:: path:: Path :: new ( & root_dir)
57
- . join ( "target/debug/cargo-clippy" ) ;
58
64
std:: env:: set_current_dir ( root_dir. join ( d) ) . unwrap ( ) ;
59
- let output = std:: process:: Command :: new ( clippy_cmd)
65
+ let output = std:: process:: Command :: new ( & clippy_cmd)
66
+ . env ( "CLIPPY_DOGFOOD" , "1" )
60
67
. arg ( "clippy" )
61
68
. arg ( "--" )
62
69
. args ( & [ "-D" , "clippy::all" ] )
You can’t perform that action at this time.
0 commit comments