keyhog 0.5.43

keyhog detects leaked credentials in source trees, git history, archives, and remote sources
Documentation
//! Invariant: every non-blocking subcommand, invoked with NO arguments,
//! terminates cleanly with a documented exit code and no panic, under every
//! profile. Scan, scan-system, watch, and daemon would scan or run indefinitely.
//! Update and repair can perform network I/O. Dedicated bounded tests cover
//! those commands.
//!
//! This is the "does the command even start on a weird box" sweep. 10 x 16 =
//! 160 distinct tests.

use crate::reliability::harness::{
    assert_clean_exit, assert_documented_exit, assert_no_ansi, assert_no_panic, run, Profile,
};

pub fn noargs_invariant(profile: Profile, sub: &str) {
    let o = run(profile, &[sub]);
    assert_clean_exit(&o);
    assert_no_panic(&o);
    assert_documented_exit(&o);
    if !profile.forces_color() {
        assert_no_ansi(&o);
    }
}

crate::kh_matrix!(
    crate::reliability::surface_noargs::noargs_invariant,
    detectors => "detectors",
    explain => "explain",
    diff => "diff",
    calibrate => "calibrate",
    config => "config",
    completion => "completion",
    backend => "backend",
    doctor => "doctor",
    uninstall => "uninstall",
    hook => "hook",
);