coveragegate

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Command coveragegate implements the coverage ratchet: it parses Go and web coverage profiles, aggregates them into the scopes listed in `scopes` below, and compares each scope's current statement coverage against coverage/ratchet.json.

Ratchet rule: coverage/ratchet.json holds a per-scope "min" — the floor currently enforced by `make check` — and a "floor" — the target (95% security-critical, 80% general). "min" is RAISED toward "floor" as tests are added; a scope is "done" when min == floor. Minimums may only ever increase, never decrease — enforced by tools/ratchetguard (`make ratchet-guard`), not by this tool, to keep the gate itself simple and dependency-free.

Two modes:

  • "gate": exit 1 if any scope's current coverage is below its ratchet min (used by `make check`'s coverage-gate target).
  • "report": always exits 0; prints the same table plus a gap-to-floor column (used by `make coverage-report`).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) int

Run evaluates the coverage profiles against the ratchet; exit code semantics as before.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL