Documentation
¶
Overview ¶
Command covercore runs `go test -cover` on the core packages, prints a per-package coverage table and exits 1 when any package is below the minimum, naming it.
Usage: go run ./tools/covercore [-min 85] [-go go] [-json file] [package pattern ...]
With no patterns it covers the core packages of Story 1.23: internal/engine, internal/source/..., decode, detect, suppress, verify, enrich, grade, secret, netx, registry, gitx, internal/config, the public config package and internal/hook, plus the rest of the release gate's list (Story 4.18): the public report package, internal/fixplan, internal/candidate and internal/warnx. The public root package is gated by scripts/cover-library.sh, which also counts the black-box tests in tests/api. A package with no test files or no coverage line counts as 0.0%. -json writes every row to a file ({"min": 85, "packages": [{"package", "percent"}]}) for the release gates (tools/gates). Exit code 2 means the tests failed or the tool could not run.