pub fn run(sub_m: &ArgMatches) -> Result<Outcome, SsgError>Expand description
Executes the audit subcommand against the parsed clap matches.
§Errors
Returns SsgError when the site cannot be loaded or rendering
fails. Findings themselves never produce an Err — they’re folded
into the returned Outcome.
§Examples
use ssg::cmd::audit::{build_subcommand, run, Outcome};
let tmp = tempfile::tempdir().unwrap();
let site = tmp.path().join("public");
std::fs::create_dir_all(&site).unwrap();
let cmd = build_subcommand();
let matches = cmd
.try_get_matches_from(["audit", "--output", site.to_str().unwrap()])
.unwrap();
let outcome = run(&matches).unwrap();
assert_eq!(outcome, Outcome::Pass);