cmd/vet: check unkeyed fields only when pkg is built #16725
Closed
Labels
Comments
Unfortunate, known, and maybe working as intended. Vet can't type check if the packages being imported have not been compiled, as there is no type information for them. |
@robpike Thank you. If this is intended, I'd like to suggest improving cmd/vet documentation Currently, there's no compilation information: |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
go version
)?go version go1.7 linux/amd64
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ymmt/t"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build329948438=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
go vet
without built binaries will not produce warnings.go vet
produce warnings.What did you expect to see?
src/b/b.go:6: a.A composite literal uses unkeyed fields
exit status 1
What did you see instead?
Nothing, if no a binary.
The text was updated successfully, but these errors were encountered: