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

View file

@ -16,6 +16,8 @@ enum CliCommand {
/// Runs `cargo clippy`.
Clippy(tasks::clippy::ClippyArgs),
Licenses(tasks::licenses::LicensesArgs),
/// Checks that packages conform to a set of standards.
PackageConformity(tasks::package_conformity::PackageConformityArgs),
}
fn main() -> Result<()> {
@ -24,5 +26,8 @@ fn main() -> Result<()> {
match args.command {
CliCommand::Clippy(args) => tasks::clippy::run_clippy(args),
CliCommand::Licenses(args) => tasks::licenses::run_licenses(args),
CliCommand::PackageConformity(args) => {
tasks::package_conformity::run_package_conformity(args)
}
}
}