Skip to content

Commit

Permalink
Auto merge of #6802 - camsteffen:dogfood-fix, r=llogiq
Browse files Browse the repository at this point in the history
Remove workspace and fix dogfood (again)

changelog: none

In response to #6733 (comment)
  • Loading branch information
bors committed Feb 28, 2021
2 parents 6971b0d + d71ed26 commit abd2c7e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/clippy_bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/dogfood.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
12 changes: 6 additions & 6 deletions tests/versioncheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit abd2c7e

Please sign in to comment.