use crate::rules::{Evidence, Finding, Rule, Stance, Trend};
use crate::shell::Parsed;
pub const RULE: Rule = Rule {
id: "no-verify",
default_stance: Stance::Observe,
evidence: Evidence {
per_1000: 5.4,
measured: "2026-08-20",
trend: Trend::Improving,
},
examine,
confirm: None,
};
fn examine(parsed: &Parsed) -> Option<Finding> {
for cmd in parsed.clauses() {
if cmd.program() != Some("git") {
continue;
}
let sub = cmd.subcommand();
let long = cmd.has_flag("--no-verify");
let short = sub == Some("commit") && cmd.has_short('n');
if !long && !short {
continue;
}
return Some(Finding {
reason: "`--no-verify` does not skip one check — it skips the whole \
pre-commit and commit-msg gate, including the ones that were \
not in the way."
.to_string(),
remedy: "Downgrade the specific check instead: \
`git config amont.severity.<check-id> warn`. \
`amont list --json` names the check that is blocking."
.to_string(),
span: cmd.at..cmd.end,
});
}
None
}