go-vet-analyzers logo

go-vet-analyzers

Pure-Go go vet analyzers — small, dependency-light go/analysis tools that turn project conventions into checks that fail CI instead of relying on human discipline.

go install github.com/go-vet-analyzers/<analyzer>/cmd/<analyzer>@latest
go vet -vettool="$(go env GOPATH)/bin/<analyzer>" ./...

nonnil

Enforces the Null-Object invariant — fails the build when an interface declaring IsNull() bool is returned, assigned, or stored as a bare nil.

go install github.com/go-vet-analyzers/nonnil/cmd/nonnil@latest

respondto

Makes reflective method-name strings compile-checked — flags a RespondTo("Method") whose literal names a method the resolved type does not have.

go install github.com/go-vet-analyzers/respondto/cmd/respondto@latest

Both analyzers are deliberately conservative — they report only when certain, so false positives stay near zero. No cgo, 100% test coverage, multi-OS/arch CI. Full docs: go-vet-analyzers.github.io/docs.