diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-02-23 21:27:32 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2021-02-26 10:59:40 +0100 |
| commit | 12dc03033f9d441f1382a7684480c4a863b33bb8 (patch) | |
| tree | 4456cf2f9cbc90a3e6ffef039f77cc509c68078a /clippy_dev | |
| parent | d5223be2e30a9d116b839bda418bec99d2949a68 (diff) | |
| download | rust-12dc03033f9d441f1382a7684480c4a863b33bb8.tar.gz rust-12dc03033f9d441f1382a7684480c4a863b33bb8.zip | |
lintcheck: fix bug when getting the config toml path.
In order to check if we need to recheck crates, I was getting the path from clap only which is None if we don't pass it via cmdline args. Use the dedicated lintcheck_config_toml() fnuction instead!
Diffstat (limited to 'clippy_dev')
| -rw-r--r-- | clippy_dev/src/lintcheck.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clippy_dev/src/lintcheck.rs b/clippy_dev/src/lintcheck.rs index b806f545284..a4e6fe76c32 100644 --- a/clippy_dev/src/lintcheck.rs +++ b/clippy_dev/src/lintcheck.rs @@ -336,8 +336,8 @@ fn build_clippy() { } /// Read a `toml` file and return a list of `CrateSources` that we want to check with clippy -fn read_crates(toml_path: Option<&str>) -> (String, Vec<CrateSource>) { - let toml_path = lintcheck_config_toml(toml_path); +fn read_crates(clap_toml_path: Option<&str>) -> (String, Vec<CrateSource>) { + let toml_path = lintcheck_config_toml(clap_toml_path); // save it so that we can use the name of the sources.toml as name for the logfile later. let toml_filename = toml_path.file_stem().unwrap().to_str().unwrap().to_string(); let toml_content: String = @@ -478,7 +478,8 @@ pub fn run(clap_config: &ArgMatches) { build_clippy(); println!("Done compiling"); - let clap_toml_path = clap_config.value_of("crates-toml"); + let clap_toml_path: Option<&str> = clap_config.value_of("crates-toml"); + let toml_path = lintcheck_config_toml(clap_toml_path); // if the clippy bin is newer than our logs, throw away target dirs to force clippy to // refresh the logs |
