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