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: KindImplementations§
Trait 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.
Source§fn weight(&self) -> Weight
fn weight(&self) -> Weight
Heavy when the line says heavy, or when it MOVES a built-in Heavy
gate: pre-commit cargo-test runs the suite pre-push-cargo-test
would, and must queue as that gate does (ADR-0013).
fn name(&self) -> &str
fn stage(&self) -> Stage
fn severity(&self) -> Severity
fn run(&self, ctx: &Ctx<'_>) -> Outcome
Source§fn pairing_name(&self) -> &str
fn pairing_name(&self) -> &str
Source§fn reach(&self) -> Reach
fn reach(&self) -> Reach
amont.conventions is declared —
see Reach. Externals default to Convention, which costs them
nothing: a declared check only exists where an amont.conf does,
and that is exactly the declaration the mode asks for.Source§fn would_judge(&self, staged: &[String], tracked: Option<&[String]>) -> bool
fn would_judge(&self, staged: &[String], tracked: Option<&[String]>) -> bool
Skipped when this says yes
and Inert when it says no (ADR-0020). tracked: None (git would not
list the index) answers yes: a skip is said, never hidden.