pub struct External {
pub id: String,
pub short_name: String,
pub stage: Stage,
pub kind: Kind,
}Expand description
A check a repository declares, rather than one compiled in.
Fields§
§id: String<trigger>-<name> — what hook.skip and amont.severity.<key>
resolve against, and what Check::name returns. Built-ins have had this
shape all along; declared checks answering to a bare name were invisible
to hook.skip pre-commit.
short_name: StringThe name as written in the manifest — the “short name” of the vocabulary
— used for messages. A line too malformed to name itself falls back to
its position, and reading pre-commit-amont.conf:3 back to somebody
helps nobody.
stage: Stage§kind: KindTrait Implementations§
Source§impl Check for External
impl Check for External
Source§fn scope(&self) -> Scope
fn scope(&self) -> Scope
Derived for an unusable check rather than stored: it never runs, so its scope is a question with no answer, and computing one here keeps the DATA from carrying a value that means nothing.
fn name(&self) -> &str
fn stage(&self) -> Stage
fn severity(&self) -> Severity
fn run(&self, ctx: &Ctx<'_>) -> Outcome
Auto Trait Implementations§
impl Freeze for External
impl RefUnwindSafe for External
impl Send for External
impl Sync for External
impl Unpin for External
impl UnsafeUnpin for External
impl UnwindSafe for External
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