Skip to main content

verify_facts

Function verify_facts 

Source
pub fn verify_facts(mana_dir: &Path) -> Result<VerifyFactsResult, Error>
Expand description

Verify all facts and report staleness and failures.

Re-runs the verify command for every unit with unit_type = "fact". Stale facts (past their stale_after date) are reported without re-running. Facts that require artifacts produced by failing/stale facts are flagged as “suspect” (up to depth 3 in the dependency chain).

Facts whose verify passes have their stale_after deadline extended.

§Errors

§Example

use mana_core::api::verify_facts;
use std::path::Path;

let r = verify_facts(Path::new("/project/.mana")).unwrap();
println!("{}/{} facts verified", r.verified_count, r.total_facts);
if r.failing_count > 0 {
    println!("{} facts failing!", r.failing_count);
}