Expand description
CheckSource — abstraction over a runnable check.
Design: [docs/design.md §3.2]. v0.1 ships exactly one impl (Shell,
living in the klasp binary). The trait exists at v0.1 so v0.2’s named
recipes (pre_commit, fallow, pytest, cargo) and v0.3’s
subprocess plugins land as new impls without touching the trait.
Lifetime note: source_id(&self) -> &str returns a &str tied to
&self, not &'static str. v0.3 subprocess plugins have IDs derived
from binary filenames discovered at runtime — a 'static lifetime
cannot represent that. This is the v0.3 plugin commitment locked in
at v0.1. See issue [klasp#1] for the explicit callout.
Structs§
- Check
Result - Outcome of a single
CheckSource::runinvocation. - Repo
State - Snapshot of repo metadata passed to every check execution.
Enums§
- Check
Source Error - Typed error for
CheckSource::run. Covers runtime-level failures only; semantic failures (lint hits, test failures) ride insideVerdict::Fail. UseCheckSourceError::Otherfor impl-specific errors that don’t fit the predefined variants.
Traits§
- Check
Source - Object-safe trait. Implementations are stored as
Box<dyn CheckSource>in the source registry.