Documentation
¶
Overview ¶
Command preflight is the standard check before a card is submitted or a pull request is opened: gofmt, go vet, and the unit tests through `make test-full`, in that order, stopping at the first that fails.
It prints one banner per step and ALL CHECKS PASSED at the end; a failing step prints what failed and the tool exits with that step's own exit code (gofmt findings exit 1). Nothing it runs is mocked: the toolchain it calls is the one named by GO, GOFMT and MAKE.
Flags:
-h, --help print the usage and exit 0 -run <pattern> run only the tests whose names match the regexp --run <pattern> the same
Every other argument is a package to check; with none, PKGS names the set, and with no PKGS the set is ./cmd/... ./internal/... ./pkg/... .
Environment:
GO the go command (default go) GOFMT the gofmt command (default gofmt) MAKE the make command for the test step (default make) PKGS the package set when no package is given on the command line RUN the test regexp when -run is not given NOVA_TEST_NO_HOST the host guard every test runs under (default 1) example: go run ./tools/preflight ./pkg/swarm go run ./tools/preflight -run TestLease ./pkg/swarm ./cmd/nova-swarm make preflight PKGS=./pkg/swarm RUN=TestLease
Click to show internal directories.
Click to hide internal directories.