1
+ use crate :: clippy_project_root;
1
2
use std:: path:: PathBuf ;
2
3
use std:: process:: Command ;
3
-
4
4
// represents an archive we download from crates.io
5
5
#[ derive( Debug ) ]
6
6
struct KrateSource {
@@ -75,18 +75,19 @@ impl Krate {
75
75
println ! ( "Linting {} {}..." , & self . name, & self . version) ;
76
76
let cargo_clippy_path = std:: fs:: canonicalize ( cargo_clippy_path) . unwrap ( ) ;
77
77
78
+ let shared_target_dir = clippy_project_root ( ) . join ( "target/crater/shared_target_dir/" ) ;
79
+
78
80
let all_output = std:: process:: Command :: new ( cargo_clippy_path)
81
+ . env ( "CARGO_TARGET_DIR" , shared_target_dir)
79
82
// lint warnings will look like this:
80
83
// src/cargo/ops/cargo_compile.rs:127:35: warning: usage of `FromIterator::from_iter`
81
84
. args ( & [
82
85
"--" ,
83
86
"--message-format=short" ,
84
87
"--" ,
85
88
"--cap-lints=warn" ,
86
- /* "--",
87
89
"-Wclippy::pedantic" ,
88
- "--",
89
- "-Wclippy::cargo", */
90
+ "-Wclippy::cargo" ,
90
91
] )
91
92
. current_dir ( & self . path )
92
93
. output ( )
@@ -135,7 +136,7 @@ pub fn run() {
135
136
KrateSource :: new( "cargo" , "0.49.0" ) ,
136
137
KrateSource :: new( "iron" , "0.6.1" ) ,
137
138
KrateSource :: new( "ripgrep" , "12.1.1" ) ,
138
- KrateSource :: new( "tokei" , "12.0.4" ) ,
139
+ // KrateSource::new("tokei", "12.0.4"),
139
140
KrateSource :: new( "xsv" , "0.13.0" ) ,
140
141
KrateSource :: new( "serde" , "1.0.118" ) ,
141
142
KrateSource :: new( "rayon" , "1.5.0" ) ,
@@ -149,8 +150,7 @@ pub fn run() {
149
150
KrateSource :: new( "proc-macro2" , "1.0.24" ) ,
150
151
KrateSource :: new( "bitflags" , "1.2.1" ) ,
151
152
KrateSource :: new( "log" , "0.4.11" ) ,
152
- KrateSource :: new( "regex" , "1.4.2" )
153
- //
153
+ KrateSource :: new( "regex" , "1.4.2" ) ,
154
154
] ;
155
155
156
156
println ! ( "Compiling clippy..." ) ;
0 commit comments