Files
oak-gpui/tooling/xtask/src/workspace.rs
T
Marshall Bowers f2060ccbe0 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
2024-07-25 19:20:08 -04:00

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")
}