From bd8369089c38c190533b41ce76b073f5478f17d4 Mon Sep 17 00:00:00 2001 From: Alex Macleod Date: Tue, 25 Oct 2022 11:32:49 +0000 Subject: Track `clippy.toml` and `Cargo.toml` in `file_depinfo` Causes cargo to re-run clippy when those paths are modified Also tracks the path to `clippy-driver` in debug mode to remove the workarounds in `cargo dev lint` and `lintcheck` --- clippy_dev/Cargo.toml | 1 - clippy_dev/src/lint.rs | 8 -------- 2 files changed, 9 deletions(-) (limited to 'clippy_dev') diff --git a/clippy_dev/Cargo.toml b/clippy_dev/Cargo.toml index 2ac3b4fe2ed..510c7e852af 100644 --- a/clippy_dev/Cargo.toml +++ b/clippy_dev/Cargo.toml @@ -10,7 +10,6 @@ indoc = "1.0" itertools = "0.10.1" opener = "0.5" shell-escape = "0.1" -tempfile = "3.2" walkdir = "2.3" [features] diff --git a/clippy_dev/src/lint.rs b/clippy_dev/src/lint.rs index 71005449b4d..aafd0f71a59 100644 --- a/clippy_dev/src/lint.rs +++ b/clippy_dev/src/lint.rs @@ -36,20 +36,12 @@ pub fn run<'a>(path: &str, args: impl Iterator) { } else { exit_if_err(Command::new("cargo").arg("build").status()); - // Run in a tempdir as changes to clippy do not retrigger linting - let target = tempfile::Builder::new() - .prefix("clippy") - .tempdir() - .expect("failed to create tempdir"); - let status = Command::new(cargo_clippy_path()) .arg("clippy") .args(args) .current_dir(path) - .env("CARGO_TARGET_DIR", target.as_ref()) .status(); - target.close().expect("failed to remove tempdir"); exit_if_err(status); } } -- cgit 1.4.1-3-g733a5