about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Macleod <alex@macleod.io>2023-06-27 16:39:13 +0000
committerAlex Macleod <alex@macleod.io>2023-06-27 16:39:13 +0000
commit76de5560faf576d9d19a32fa4175da3b43c757bd (patch)
treeb186b8290cb716b4f2479513b899562b860a86e9
parentecdea8cdd386260970dad617cae2a71b25a307f5 (diff)
downloadrust-76de5560faf576d9d19a32fa4175da3b43c757bd.tar.gz
rust-76de5560faf576d9d19a32fa4175da3b43c757bd.zip
Add BLESS for compile-test and some cleanup
-rw-r--r--book/src/development/adding_lints.md2
-rw-r--r--clippy_test_deps/Cargo.toml2
-rw-r--r--tests/compile-test.rs3
3 files changed, 2 insertions, 5 deletions
diff --git a/book/src/development/adding_lints.md b/book/src/development/adding_lints.md
index cfcb060c46e..a0db8089250 100644
--- a/book/src/development/adding_lints.md
+++ b/book/src/development/adding_lints.md
@@ -414,7 +414,7 @@ fn is_foo_fn(fn_kind: FnKind<'_>) -> bool {
 
 Now we should also run the full test suite with `cargo test`. At this point
 running `cargo test` should produce the expected output. Remember to run `cargo
-dev bless` to update the `.stderr` file.
+bless` to update the `.stderr` file.
 
 `cargo test` (as opposed to `cargo uitest`) will also ensure that our lint
 implementation is not violating any Clippy lints itself.
diff --git a/clippy_test_deps/Cargo.toml b/clippy_test_deps/Cargo.toml
index 6d053253fc3..362c08e0d77 100644
--- a/clippy_test_deps/Cargo.toml
+++ b/clippy_test_deps/Cargo.toml
@@ -6,7 +6,6 @@ edition = "2021"
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-clap = { version = "4.1.4", features = ["derive"] }
 clippy_utils = { path = "../clippy_utils" }
 derive-new = "0.5"
 if_chain = "1.0"
@@ -17,7 +16,6 @@ syn = { version = "2.0", features = ["full"] }
 futures = "0.3"
 parking_lot = "0.12"
 tokio = { version = "1", features = ["io-util"] }
-rustc-semver = "1.1"
 regex = "1.5"
 clippy_lints = { path = "../clippy_lints" }
 
diff --git a/tests/compile-test.rs b/tests/compile-test.rs
index c5e8622bc85..3ea33c3d233 100644
--- a/tests/compile-test.rs
+++ b/tests/compile-test.rs
@@ -24,7 +24,7 @@ fn base_config(test_dir: &str) -> compiletest::Config {
         mode: TestMode::Yolo,
         stderr_filters: vec![],
         stdout_filters: vec![],
-        output_conflict_handling: if std::env::args().any(|arg| arg == "--bless") {
+        output_conflict_handling: if var_os("BLESS").is_some() || env::args().any(|arg| arg == "--bless") {
             compiletest::OutputConflictHandling::Bless
         } else {
             compiletest::OutputConflictHandling::Error("cargo test -- -- --bless".into())
@@ -295,7 +295,6 @@ fn rustfix_coverage_known_exceptions_accuracy() {
         let rs_path = Path::new("tests/ui").join(filename);
         assert!(rs_path.exists(), "`{}` does not exist", rs_path.display());
         let fixed_path = rs_path.with_extension("fixed");
-        println!("{}", fixed_path.display());
         assert!(!fixed_path.exists(), "`{}` exists", fixed_path.display());
     }
 }