repo-trust 0.1.1

A command-line tool that tells you whether an open-source repository deserves your trust — beyond the star count.
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! JSON report writer. Emits the frozen schema (see `docs/architecture.md` §5).

use anyhow::Result;

use crate::models::TrustReport;

pub fn write(report: &TrustReport, path: &std::path::Path) -> Result<()> {
    let s = serde_json::to_string_pretty(report)?;
    std::fs::write(path, s)?;
    Ok(())
}