Skip to main content

basic/
basic.rs

1//! Minimal example: check dependency health and emit a report.
2//!
3//! Run with: `cargo run --example basic`
4
5use dev_deps::{DepCheck, DepScope};
6
7fn main() -> Result<(), Box<dyn std::error::Error>> {
8    let check = DepCheck::new("example", "0.1.0").scope(DepScope::All);
9    let result = check.execute()?;
10    println!("Total findings: {}", result.total_findings());
11    let report = result.into_report();
12    println!("{}", report.to_json()?);
13    Ok(())
14}