|
4 | 4 | // When a new lint is introduced, we can search the results for new warnings and check for false
|
5 | 5 | // positives.
|
6 | 6 |
|
7 |
| -#![cfg(feature = "crater")] |
| 7 | +#![cfg(feature = "lintcheck")] |
8 | 8 | #![allow(clippy::filter_map)]
|
9 | 9 |
|
10 | 10 | use crate::clippy_project_root;
|
@@ -69,16 +69,16 @@ impl std::fmt::Display for ClippyWarning {
|
69 | 69 |
|
70 | 70 | impl CrateSource {
|
71 | 71 | fn download_and_extract(&self) -> Crate {
|
72 |
| - let extract_dir = PathBuf::from("target/crater/crates"); |
73 |
| - let krate_download_dir = PathBuf::from("target/crater/downloads"); |
| 72 | + let extract_dir = PathBuf::from("target/lintcheck/crates"); |
| 73 | + let krate_download_dir = PathBuf::from("target/lintcheck/downloads"); |
74 | 74 |
|
75 | 75 | // url to download the crate from crates.io
|
76 | 76 | let url = format!(
|
77 | 77 | "https://crates.io/api/v1/crates/{}/{}/download",
|
78 | 78 | self.name, self.version
|
79 | 79 | );
|
80 | 80 | println!("Downloading and extracting {} {} from {}", self.name, self.version, url);
|
81 |
| - let _ = std::fs::create_dir("target/crater/"); |
| 81 | + let _ = std::fs::create_dir("target/lintcheck/"); |
82 | 82 | let _ = std::fs::create_dir(&krate_download_dir);
|
83 | 83 | let _ = std::fs::create_dir(&extract_dir);
|
84 | 84 |
|
@@ -112,7 +112,7 @@ impl Crate {
|
112 | 112 | println!("Linting {} {}...", &self.name, &self.version);
|
113 | 113 | let cargo_clippy_path = std::fs::canonicalize(cargo_clippy_path).unwrap();
|
114 | 114 |
|
115 |
| - let shared_target_dir = clippy_project_root().join("target/crater/shared_target_dir/"); |
| 115 | + let shared_target_dir = clippy_project_root().join("target/lintcheck/shared_target_dir/"); |
116 | 116 |
|
117 | 117 | let all_output = std::process::Command::new(cargo_clippy_path)
|
118 | 118 | .env("CARGO_TARGET_DIR", shared_target_dir)
|
@@ -149,9 +149,9 @@ fn build_clippy() {
|
149 | 149 | .expect("Failed to build clippy!");
|
150 | 150 | }
|
151 | 151 |
|
152 |
| -// get a list of CrateSources we want to check from a "crater_crates.toml" file. |
| 152 | +// get a list of CrateSources we want to check from a "lintcheck_crates.toml" file. |
153 | 153 | fn read_crates() -> Vec<CrateSource> {
|
154 |
| - let toml_path = PathBuf::from("clippy_dev/crater_crates.toml"); |
| 154 | + let toml_path = PathBuf::from("clippy_dev/lintcheck_crates.toml"); |
155 | 155 | let toml_content: String =
|
156 | 156 | std::fs::read_to_string(&toml_path).unwrap_or_else(|_| panic!("Failed to read {}", toml_path.display()));
|
157 | 157 | let crate_list: CrateList =
|
@@ -231,7 +231,7 @@ pub fn run(clap_config: &ArgMatches) {
|
231 | 231 | // if we don't have the specified crated in the .toml, throw an error
|
232 | 232 | if !crates.iter().any(|krate| krate.name == only_one_crate) {
|
233 | 233 | eprintln!(
|
234 |
| - "ERROR: could not find crate '{}' in clippy_dev/crater_crates.toml", |
| 234 | + "ERROR: could not find crate '{}' in clippy_dev/lintcheck_crates.toml", |
235 | 235 | only_one_crate
|
236 | 236 | );
|
237 | 237 | std::process::exit(1);
|
@@ -279,8 +279,8 @@ pub fn run(clap_config: &ArgMatches) {
|
279 | 279 | all_msgs.push("\n\n\n\nStats\n\n".into());
|
280 | 280 | all_msgs.push(stats_formatted);
|
281 | 281 |
|
282 |
| - // save the text into mini-crater/logs.txt |
| 282 | + // save the text into lintcheck-logs/logs.txt |
283 | 283 | let mut text = clippy_ver; // clippy version number on top
|
284 | 284 | text.push_str(&format!("\n{}", all_msgs.join("")));
|
285 |
| - write("mini-crater/logs.txt", text).unwrap(); |
| 285 | + write("lintcheck-logs/logs.txt", text).unwrap(); |
286 | 286 | }
|
0 commit comments