File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ cargo dev-lintcheck
21
21
22
22
By default the logs will be saved into ` lintcheck-logs/lintcheck_crates_logs.txt ` .
23
23
24
- You can set a custom sources.toml by adding ` --crates-toml custom.toml `
24
+ You can set a custom sources.toml by adding ` --crates-toml custom.toml ` or using ` LINTCHECK_TOML="custom.toml" `
25
25
where ` custom.toml ` must be a relative path from the repo root.
26
26
27
27
The results will then be saved to ` lintcheck-logs/custom_logs.toml ` .
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ use crate::clippy_project_root;
11
11
12
12
use std:: collections:: HashMap ;
13
13
use std:: process:: Command ;
14
- use std:: { fmt, fs:: write, path:: PathBuf } ;
14
+ use std:: { env , fmt, fs:: write, path:: PathBuf } ;
15
15
16
16
use clap:: ArgMatches ;
17
17
use serde:: { Deserialize , Serialize } ;
@@ -227,7 +227,9 @@ fn build_clippy() {
227
227
228
228
// get a list of CrateSources we want to check from a "lintcheck_crates.toml" file.
229
229
fn read_crates ( toml_path : Option < & str > ) -> ( String , Vec < CrateSource > ) {
230
- let toml_path = PathBuf :: from ( toml_path. unwrap_or ( "clippy_dev/lintcheck_crates.toml" ) ) ;
230
+ let toml_path = PathBuf :: from (
231
+ env:: var ( "LINTCHECK_TOML" ) . unwrap_or ( toml_path. unwrap_or ( "clippy_dev/lintcheck_crates.toml" ) . to_string ( ) ) ,
232
+ ) ;
231
233
// save it so that we can use the name of the sources.toml as name for the logfile later.
232
234
let toml_filename = toml_path. file_stem ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) . to_string ( ) ;
233
235
let toml_content: String =
You can’t perform that action at this time.
0 commit comments