Documentation
¶
Overview ¶
Command precheck-audits runs, in every package `make precheck` does not already cover, the tests that audit the committed tree, so that a lane meets them in minutes rather than most of an hour into a preflight (iss-2611061656036069, iss-2610230048490215). There is no list of tests to keep: a new audit is chosen by what it does.
A test is an audit here by testreuse.Audits: it reaches the repository tree from its package directory, in its own body, in a same-package helper it names or in a package-level value, and not only through a helper that starts a process.
What it cannot see: a tree reached through a helper in another package, other than fsutil.ModuleRoot, and a climb assembled at run time. The command and site packages stay on the name pattern in the Makefile (PRECHECK_AUDIT_TESTS), where hundreds of tests reach the root and a whole selection would not be minutes.
Usage, from the repository root:
go run ./cmd/precheck-audits ./internal/already/run ./internal/also/run
Each argument is a package the recipe runs another way, left out here. It exits with go test's own failure, and 2 when it cannot read a test file, is given something that is not a package path, or finds nothing at all, which would mean the detector stopped working rather than that there are no audits.
It is developer tooling, never part of a release.