pub struct Declared {
pub fix: Fix,
pub files: bool,
pub name: String,
pub stage: Stage,
pub severity: Severity,
pub exts: Vec<String>,
pub names: Vec<String>,
pub program: String,
pub args: Vec<String>,
}Expand description
A line that parsed. Every field means something.
program and args rather than one argv: a runnable check must have a
command, and splitting the head off makes that structural instead of a
split_first guard that can only ever be dead code.
Fields§
§fix: FixFix::Rewrite when the command column began fix .
files: boolThe command column carried the files marker.
name: String§stage: Stage§severity: Severity§exts: Vec<String>Extensions that gate it. Empty means any change — the * scope.
names: Vec<String>Exact filenames that gate it — the scope column’s bare tokens.
program: String§args: Vec<String>Implementations§
Source§impl Declared
impl Declared
Sourcepub fn id(&self) -> String
pub fn id(&self) -> String
<trigger>-<name>, the same shape a built-in has.
This is what hook.skip and amont.severity.<key> resolve against,
so a declared check answers to its trigger and its short name exactly as
a compiled-in one does. Before it had an id, hook.skip pre-commit
silenced fifteen built-ins and left every declared check running.