Skip to main content

Module source

Module source 

Source
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§

CheckResult
Outcome of a single CheckSource::run invocation.
RepoState
Snapshot of repo metadata passed to every check execution.

Enums§

CheckSourceError
Typed error for CheckSource::run. Covers runtime-level failures only; semantic failures (lint hits, test failures) ride inside Verdict::Fail. Use CheckSourceError::Other for impl-specific errors that don’t fit the predefined variants.

Traits§

CheckSource
Object-safe trait. Implementations are stored as Box<dyn CheckSource> in the source registry.