PR CheckMate API - v3.0.2
    Preparing search index...

    Interface Check

    A single quality gate. applies decides relevance (language/marker gating); run performs the check and returns an outcome. run must NOT throw for violations — return fail/warn instead. Thrown errors are caught by the orchestrator and recorded as fail.

    interface Check {
        name: string;
        phase: Phase;
        requiresDiff?: boolean;
        weight?: "heavy";
        applies(ctx: CheckContext): boolean | Promise<boolean>;
        run(ctx: CheckContext): Promise<CheckOutcome>;
    }
    Index
    name: string
    phase: Phase
    requiresDiff?: boolean

    The check reviews a diff and has nothing to say without one. Declared here rather than folded into applies so the orchestrator can tell the two kinds of "not applicable" apart:

    • a check that does not apply (SwiftLint in a Python repo) is noise, and is left out of the report entirely;
    • a check that would have applied but had no diff range is a gap in coverage, and is reported as a skip with the reason.

    Before this existed, both simply vanished — so a shallow clone removed most of the security surface and still printed a clean, complete-looking report.

    weight?: "heavy"

    The check spawns something expensive — a whole-project analyser like knip, jscpd, dpdm, tsc or grype. The orchestrator admits only a couple of these at once, independently of the overall concurrency limit: four regex scans in parallel are free, four project-wide analysers are not.