Skip to content

Commit abd2c7e

Browse files
committed
Auto merge of #6802 - camsteffen:dogfood-fix, r=llogiq
Remove workspace and fix dogfood (again) changelog: none In response to #6733 (comment)
2 parents 6971b0d + d71ed26 commit abd2c7e

File tree

5 files changed

+27
-13
lines changed

5 files changed

+27
-13
lines changed

.github/workflows/clippy.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,16 @@ jobs:
5353
- name: Test "--fix -Zunstable-options"
5454
run: cargo run --features deny-warnings,internal-lints --bin cargo-clippy -- clippy --fix -Zunstable-options
5555

56-
- name: Test Workspace
57-
run: cargo test --all --features deny-warnings,internal-lints
56+
- name: Test
57+
run: cargo test --features deny-warnings,internal-lints
58+
59+
- name: Test clippy_lints
60+
run: cargo test --features deny-warnings,internal-lints
61+
working-directory: clippy_lints
62+
63+
- name: Test rustc_tools_util
64+
run: cargo test --features deny-warnings
65+
working-directory: rustc_tools_util
5866

5967
- name: Test clippy_dev
6068
run: cargo test --features deny-warnings

.github/workflows/clippy_bors.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,16 @@ jobs:
112112
- name: Build
113113
run: cargo build --features deny-warnings,internal-lints
114114

115-
- name: Test Workspace
116-
run: cargo test --all --features deny-warnings,internal-lints
115+
- name: Test
116+
run: cargo test --features deny-warnings,internal-lints
117+
118+
- name: Test clippy_lints
119+
run: cargo test --features deny-warnings,internal-lints
120+
working-directory: clippy_lints
121+
122+
- name: Test rustc_tools_util
123+
run: cargo test --features deny-warnings
124+
working-directory: rustc_tools_util
117125

118126
- name: Test clippy_dev
119127
run: cargo test --features deny-warnings

Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ build = "build.rs"
1818
edition = "2018"
1919
publish = false
2020

21-
[workspace]
22-
exclude = ["clippy_dev", "mini-macro", "target/lintcheck/crates"]
23-
2421
[[bin]]
2522
name = "cargo-clippy"
2623
test = false

tests/dogfood.rs

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ fn dogfood_clippy() {
2626
.arg("clippy-preview")
2727
.arg("--all-targets")
2828
.arg("--all-features")
29+
.args(&["-p", "clippy_lints", "-p", "clippy_utils", "-p", "rustc_tools_util"])
2930
.arg("--")
3031
.args(&["-D", "clippy::all"])
3132
.args(&["-D", "clippy::pedantic"])

tests/versioncheck.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ fn check_that_clippy_lints_and_clippy_utils_have_the_same_version_as_clippy() {
99
.expect("could not obtain cargo metadata");
1010

1111
for krate in &["clippy_lints", "clippy_utils"] {
12-
let krate_meta = clippy_meta
13-
.packages
14-
.iter()
15-
.find(|package| package.name == *krate)
12+
let krate_meta = cargo_metadata::MetadataCommand::new()
13+
.current_dir(std::env::current_dir().unwrap().join(krate))
14+
.no_deps()
15+
.exec()
1616
.expect("could not obtain cargo metadata");
17-
assert_eq!(krate_meta.version, clippy_meta.packages[0].version);
17+
assert_eq!(krate_meta.packages[0].version, clippy_meta.packages[0].version);
1818
for package in &clippy_meta.packages[0].dependencies {
1919
if package.name == *krate {
20-
assert!(package.req.matches(&krate_meta.version));
20+
assert!(package.req.matches(&krate_meta.packages[0].version));
2121
break;
2222
}
2323
}

0 commit comments

Comments
 (0)