21 lines
1.1 KiB
Go
21 lines
1.1 KiB
Go
// tmvet is the project's vet tool: `go vet -vettool=$(tmvet) ./...` runs the architectural invariants,
|
|
// from `make battery` and CI.
|
|
//
|
|
// It REPLACES the standard vet suite for that invocation rather than adding to it (measured: findings
|
|
// plain `go vet` reports disappear under -vettool), which is why the Makefile runs both passes. A doc
|
|
// here once said "alongside"; it was wrong, and believing it would have silently dropped every standard
|
|
// check the day someone simplified the Makefile down to one line.
|
|
//
|
|
// A separate binary is needed because `go test -vet=<custom>` refuses anything but its built-in list
|
|
// ("-vet argument must be a supported analyzer") and `go test` ignores GOFLAGS=-vettool — measured, not
|
|
// assumed. That is why the invariants used to live in _test.go files: it was the only way to make them
|
|
// run on the ordinary battery. With `make battery` as the single entry point they no longer have to.
|
|
package main
|
|
|
|
import (
|
|
"golang.org/x/tools/go/analysis/multichecker"
|
|
|
|
"textmachine/backend/internal/archguard"
|
|
)
|
|
|
|
func main() { multichecker.Main(archguard.Analyzers()...) }
|