]> Cypherpunks repositories - gostls13.git/commit
cmd/go: pass package config to vet during "go vet"
authorRuss Cox <rsc@golang.org>
Tue, 31 Oct 2017 16:59:47 +0000 (12:59 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 1 Nov 2017 13:47:48 +0000 (13:47 +0000)
commit5617864900c397b9c0160a278ae35007e1d785ad
treef9d57abd3771f385a7977b380e5e1f28d3469f22
parent4fe42799a8a3170715dcbfa3d904ca8173131d79
cmd/go: pass package config to vet during "go vet"

After this CL, "go vet" can be guaranteed to have complete type information
about the packages being checked, even if cgo or swig is in use,
which will in turn make it reasonable for vet checks to insist on type
information. It also fixes vet's understanding of unusual import paths
like relative paths and vendored packages.

For now "go tool vet" will continue to cope without type information,
but the eventual plan is for "go tool vet" to query the go command for
what it needs, and also to be able to query alternate build systems
like bazel. But that's future work.

Fixes #4889.
Fixes #12556 (if not already fixed).
Fixes #15182.
Fixes #16086.
Fixes #17571.

Change-Id: I932626ee7da649b302cd269b82eb6fe5d7b9f0f2
Reviewed-on: https://go-review.googlesource.com/74750
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/dist/deps.go
src/cmd/go/go_test.go
src/cmd/go/internal/load/pkg.go
src/cmd/go/internal/vet/vet.go
src/cmd/go/internal/work/action.go
src/cmd/go/internal/work/exec.go
src/cmd/vet/all/whitelist/all.txt