about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/clippy.yml12
-rw-r--r--.github/workflows/clippy_bors.yml12
-rw-r--r--Cargo.toml3
-rw-r--r--tests/dogfood.rs1
-rw-r--r--tests/versioncheck.rs12
5 files changed, 27 insertions, 13 deletions
diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml
index f6ac936df4d..9d5e12aac5f 100644
--- a/.github/workflows/clippy.yml
+++ b/.github/workflows/clippy.yml
@@ -53,8 +53,16 @@ jobs:
     - name: Test "--fix -Zunstable-options"
       run: cargo run --features deny-warnings,internal-lints --bin cargo-clippy -- clippy --fix -Zunstable-options
 
-    - name: Test Workspace
-      run: cargo test --all --features deny-warnings,internal-lints
+    - name: Test
+      run: cargo test --features deny-warnings,internal-lints
+
+    - name: Test clippy_lints
+      run: cargo test --features deny-warnings,internal-lints
+      working-directory: clippy_lints
+
+    - name: Test rustc_tools_util
+      run: cargo test --features deny-warnings
+      working-directory: rustc_tools_util
 
     - name: Test clippy_dev
       run: cargo test --features deny-warnings
diff --git a/.github/workflows/clippy_bors.yml b/.github/workflows/clippy_bors.yml
index 9d24b0293c4..5d846eb64c7 100644
--- a/.github/workflows/clippy_bors.yml
+++ b/.github/workflows/clippy_bors.yml
@@ -112,8 +112,16 @@ jobs:
     - name: Build
       run: cargo build --features deny-warnings,internal-lints
 
-    - name: Test Workspace
-      run: cargo test --all --features deny-warnings,internal-lints
+    - name: Test
+      run: cargo test --features deny-warnings,internal-lints
+
+    - name: Test clippy_lints
+      run: cargo test --features deny-warnings,internal-lints
+      working-directory: clippy_lints
+
+    - name: Test rustc_tools_util
+      run: cargo test --features deny-warnings
+      working-directory: rustc_tools_util
 
     - name: Test clippy_dev
       run: cargo test --features deny-warnings
diff --git a/Cargo.toml b/Cargo.toml
index 1d6bf1ea0eb..ea32a8edd1f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,9 +18,6 @@ build = "build.rs"
 edition = "2018"
 publish = false
 
-[workspace]
-exclude = ["clippy_dev", "mini-macro", "target/lintcheck/crates"]
-
 [[bin]]
 name = "cargo-clippy"
 test = false
diff --git a/tests/dogfood.rs b/tests/dogfood.rs
index 052223d6d6f..8fe48a67beb 100644
--- a/tests/dogfood.rs
+++ b/tests/dogfood.rs
@@ -26,6 +26,7 @@ fn dogfood_clippy() {
         .arg("clippy-preview")
         .arg("--all-targets")
         .arg("--all-features")
+        .args(&["-p", "clippy_lints", "-p", "clippy_utils", "-p", "rustc_tools_util"])
         .arg("--")
         .args(&["-D", "clippy::all"])
         .args(&["-D", "clippy::pedantic"])
diff --git a/tests/versioncheck.rs b/tests/versioncheck.rs
index 1c954c57a85..aadd2c1fb7f 100644
--- a/tests/versioncheck.rs
+++ b/tests/versioncheck.rs
@@ -9,15 +9,15 @@ fn check_that_clippy_lints_and_clippy_utils_have_the_same_version_as_clippy() {
         .expect("could not obtain cargo metadata");
 
     for krate in &["clippy_lints", "clippy_utils"] {
-        let krate_meta = clippy_meta
-            .packages
-            .iter()
-            .find(|package| package.name == *krate)
+        let krate_meta = cargo_metadata::MetadataCommand::new()
+            .current_dir(std::env::current_dir().unwrap().join(krate))
+            .no_deps()
+            .exec()
             .expect("could not obtain cargo metadata");
-        assert_eq!(krate_meta.version, clippy_meta.packages[0].version);
+        assert_eq!(krate_meta.packages[0].version, clippy_meta.packages[0].version);
         for package in &clippy_meta.packages[0].dependencies {
             if package.name == *krate {
-                assert!(package.req.matches(&krate_meta.version));
+                assert!(package.req.matches(&krate_meta.packages[0].version));
                 break;
             }
         }