preflight

command
v1.6.29 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Jump to

Keyboard shortcuts

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