pub struct GateSpec {
pub id: GateId,
pub name: &'static str,
pub files: Option<&'static str>,
pub types: Option<&'static str>,
pub exclude: Option<&'static str>,
pub always_run: bool,
pub cites: &'static [RuleId],
pub run: GateFn,
}Expand description
One registry row: everything the deliveries need to know about a gate.
Fields§
§id: GateIdThe gate’s identity.
name: &'static strThe display name pre-commit shows.
files: Option<&'static str>The default files: pattern, with {docs_root} left templated.
types: Option<&'static str>The types: scope, when the gate takes one.
exclude: Option<&'static str>The default exclude: pattern, with {docs_root} left templated.
always_run: boolWhether the gate runs regardless of which files changed.
cites: &'static [RuleId]Every rule the gate can cite in a finding.
run: GateFnThe implementation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GateSpec
impl RefUnwindSafe for GateSpec
impl Send for GateSpec
impl Sync for GateSpec
impl Unpin for GateSpec
impl UnsafeUnpin for GateSpec
impl UnwindSafe for GateSpec
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