diff --git a/crate/tests/lints.rs b/crate/tests/lints.rs index e4f66c3..31f47a1 100644 --- a/crate/tests/lints.rs +++ b/crate/tests/lints.rs @@ -11,7 +11,7 @@ fn lints() { .join("..") .join("lints"); - for entry in read_dir(dir).unwrap() { + for (index, entry) in read_dir(dir).unwrap().enumerate() { let entry = entry.unwrap(); let path = entry.path(); @@ -19,10 +19,19 @@ fn lints() { writeln!(stderr(), "{:?}", path.canonicalize().unwrap()).unwrap(); std::process::Command::new("cargo") - .current_dir(path) + .current_dir(path.clone()) .env_remove("RUSTUP_TOOLCHAIN") + .env("CARGO_TARGET_DIR", format!("target_{index}")) .args(["test"]) .assert() .success(); + + std::process::Command::new("cargo") + .current_dir(path) + .env_remove("RUSTUP_TOOLCHAIN") + .env("CARGO_TARGET_DIR", format!("target_{index}")) + .args(["clean"]) + .assert() + .success(); } } diff --git a/lints/missing_owner_check/Cargo.toml b/lints/missing_owner_check/Cargo.toml index bfb6974..054acb7 100644 --- a/lints/missing_owner_check/Cargo.toml +++ b/lints/missing_owner_check/Cargo.toml @@ -51,15 +51,7 @@ anchor-spl = "0.29" dylint_testing = "2.6" [workspace] -# members = [ -# "ui/*", -# ] [package.metadata.rust-analyzer] rustc_private = true -# [workspace.metadata.dylint] -# libraries = [ -# { path = "../solana-lints-dev", pattern = "lints/*" }, -# # { git = "https://github.com/crytic/solana-lints", pattern = "lints/*" }, -# ]