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

    Interface CheckContext

    Everything a check needs to run. Assembled once by buildContext and shared across all checks — no check reads process.cwd() or process.env directly.

    interface CheckContext {
        baseSha?: string;
        cache?: Map<string, string>;
        checkNames?: string[];
        config: PRCheckMateConfig;
        cwd: string;
        headSha?: string;
        languages: Language[];
        scope?: RunScope;
        usage?: LanguageUsage[];
        write: boolean;
    }
    Index
    baseSha?: string

    Diff range for delta-aware checks; undefined → full-repo scan.

    cache?: Map<string, string>

    Per-run memoization cache for identical git invocations (many checks diff the same range). Created once per runChecks; safe because git state is stable within a run. Keyed by the git args.

    checkNames?: string[]

    Display names of the checks in this run, for the one check that reasons about the others (Config Validation, verifying severity keys).

    Passed down rather than imported: a check importing the registry would close the loop registry → check → registry, and it also lets custom checks supplied through RunOptions.checks be validated like built-in ones.

    Merged pr-checkmate.json + defaults.

    cwd: string

    Repository root the checks operate on.

    headSha?: string
    languages: Language[]

    Languages detected (or supplied) for this repo — drives applies gating.

    scope?: RunScope

    What this run is looking at, and why. Optional so hand-built contexts stay terse.

    usage?: LanguageUsage[]

    The same detection with its evidence — file counts per language. Read by the install layer, which must not confuse "this language is here" with "this language is worth a toolchain download". Absent on hand-built contexts.

    write: boolean

    When false, checks that would modify files (prettier, --fix) run read-only or skip the write.