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
10 lines
255 B
Rust
10 lines
255 B
Rust
use anyhow::{Context, Result};
|
|
use cargo_metadata::{Metadata, MetadataCommand};
|
|
|
|
/// Returns the Cargo workspace.
|
|
pub fn load_workspace() -> Result<Metadata> {
|
|
MetadataCommand::new()
|
|
.exec()
|
|
.context("failed to load cargo metadata")
|
|
}
|