xtask: Add command for checking packages conform to certain standards (#15236)

This PR adds a new `xtask` command for checking that packages conform to
certain standards.

Still a work-in-progress, but right now it checks:

- If `[lints] workspace = true` is set
- If packages are using non-workspace dependencies

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-07-25 19:20:08 -04:00 committed by GitHub
parent 13693ff80f
commit f2060ccbe0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 136 additions and 22 deletions

37
Cargo.lock generated
View file

@ -1906,6 +1906,15 @@ dependencies = [
"wayland-client",
]
[[package]]
name = "camino"
version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239"
dependencies = [
"serde",
]
[[package]]
name = "cap-fs-ext"
version = "3.0.0"
@ -1983,6 +1992,29 @@ dependencies = [
"winx",
]
[[package]]
name = "cargo-platform"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc"
dependencies = [
"serde",
]
[[package]]
name = "cargo_metadata"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037"
dependencies = [
"camino",
"cargo-platform",
"semver",
"serde",
"serde_json",
"thiserror",
]
[[package]]
name = "cargo_toml"
version = "0.20.2"
@ -9401,6 +9433,9 @@ name = "semver"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918"
dependencies = [
"serde",
]
[[package]]
name = "serde"
@ -13429,9 +13464,9 @@ name = "xtask"
version = "0.1.0"
dependencies = [
"anyhow",
"cargo_metadata",
"cargo_toml",
"clap",
"toml 0.8.10",
]
[[package]]