go vet
and go build
normally stop after finding 10 errors and abort with "too many errors
" when run on a cgo codebase:
$ go version
go version go1.10 linux/amd64
$ go vet loremipsum
src/loremipsum/foo.go:103: invalid operation: _Ctype__Bool(IS_OK(c)) && IS_EVIL(c) (mismatched types _Ctype__Bool and bool)
# 9 other vet issues
src/loremipsum/foo.go:203: too many errors
The project is large enough that each of these commands takes ~minutes to run, so I'd prefer to get a complete list of issues all at once.
I can achieve this with go build
by passing -gcflags "-e"
(https://menno.io/posts/showing-all-go-compiler-errors/)
How can I do the same for go vet
(which doesn't take a -gcflags
parameter!)