Skip to content

Commit f4090a6

Browse files
authored
Rollup merge of rust-lang#69443 - ehuss:tidy-license, r=skade,Mark-Simulacrum
tidy: Better license checks. This implements some improvements to the license checks in tidy: * Use `cargo_metadata` instead of parsing vendored crates. This allows license checks to run without vendoring enabled, and allows the checks to run on PR builds. * Check for stale entries. * Check that the licenses for exceptions are what we think they are. * Verify exceptions do not leak into the runtime. Closes rust-lang#62618 Closes rust-lang#62619 Closes rust-lang#63238 (I think) There are some substantive changes here. The follow licenses have changed from the original comments: * openssl BSD+advertising clause to Apache-2.0 * pest MPL2 to MIT/Apache-2.0 * smallvec MPL2 to MIT/Apache-2.0 * clippy lints MPL2 to MIT OR Apache-2.0
2 parents b960a1b + ed0158d commit f4090a6

File tree

5 files changed

+362
-350
lines changed

5 files changed

+362
-350
lines changed

Cargo.lock

+6-7
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,9 @@ dependencies = [
386386

387387
[[package]]
388388
name = "cargo_metadata"
389-
version = "0.9.0"
389+
version = "0.9.1"
390390
source = "registry+https://github.com/rust-lang/crates.io-index"
391-
checksum = "8d2d1617e838936c0d2323a65cc151e03ae19a7678dd24f72bccf27119b90a5d"
391+
checksum = "46e3374c604fb39d1a2f35ed5e4a4e30e60d01fab49446e08f1b3e9a90aef202"
392392
dependencies = [
393393
"semver",
394394
"serde",
@@ -450,7 +450,7 @@ dependencies = [
450450
name = "clippy"
451451
version = "0.0.212"
452452
dependencies = [
453-
"cargo_metadata 0.9.0",
453+
"cargo_metadata 0.9.1",
454454
"clippy-mini-macro-test",
455455
"clippy_lints",
456456
"compiletest_rs",
@@ -474,7 +474,7 @@ version = "0.2.0"
474474
name = "clippy_lints"
475475
version = "0.0.212"
476476
dependencies = [
477-
"cargo_metadata 0.9.0",
477+
"cargo_metadata 0.9.1",
478478
"if_chain",
479479
"itertools 0.9.0",
480480
"lazy_static 1.4.0",
@@ -2133,7 +2133,7 @@ name = "miri"
21332133
version = "0.1.0"
21342134
dependencies = [
21352135
"byteorder",
2136-
"cargo_metadata 0.9.0",
2136+
"cargo_metadata 0.9.1",
21372137
"colored",
21382138
"compiletest_rs",
21392139
"directories",
@@ -4851,10 +4851,9 @@ dependencies = [
48514851
name = "tidy"
48524852
version = "0.1.0"
48534853
dependencies = [
4854+
"cargo_metadata 0.9.1",
48544855
"lazy_static 1.4.0",
48554856
"regex",
4856-
"serde",
4857-
"serde_json",
48584857
"walkdir",
48594858
]
48604859

src/bootstrap/test.rs

-3
Original file line numberDiff line numberDiff line change
@@ -728,9 +728,6 @@ impl Step for Tidy {
728728
let mut cmd = builder.tool_cmd(Tool::Tidy);
729729
cmd.arg(builder.src.join("src"));
730730
cmd.arg(&builder.initial_cargo);
731-
if !builder.config.vendor {
732-
cmd.arg("--no-vendor");
733-
}
734731
if builder.is_verbose() {
735732
cmd.arg("--verbose");
736733
}

src/tools/tidy/Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ authors = ["Alex Crichton <[email protected]>"]
55
edition = "2018"
66

77
[dependencies]
8+
cargo_metadata = "0.9.1"
89
regex = "1"
9-
serde = { version = "1.0.8", features = ["derive"] }
10-
serde_json = "1.0.2"
1110
lazy_static = "1"
1211
walkdir = "2"

0 commit comments

Comments
 (0)