pub struct Declared {
pub fix: Fix,
pub name: String,
pub stage: Stage,
pub severity: Severity,
pub exts: 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 .
name: String§stage: Stage§severity: Severity§exts: Vec<String>Extensions that gate it. Empty means any change — the * scope.
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.
Trait Implementations§
impl Eq for Declared
impl StructuralPartialEq for Declared
Auto Trait Implementations§
impl Freeze for Declared
impl RefUnwindSafe for Declared
impl Send for Declared
impl Sync for Declared
impl Unpin for Declared
impl UnsafeUnpin for Declared
impl UnwindSafe for Declared
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more