-
Alan Donovan authored
This change deletes the legacy implementation of vet, replacing it with a short main.go that merely selects the desired analyzers and calls into the "unitchecker" implementation vendored from golang.org/x/tools/go/analysis. Unlike the full vet checker (x/tools/go/analysis/cmd/vet), the 'lite' unitchecker cannot also be run standalone (as 'go tool vet' or cmd/vet); it must be invoked by 'go vet'. This design was chosen to avoid vendoring many additional dependencies into GOROOT, in particular go/packages. If go/packages should someday become part of the standard library, there will be considerable opportunity for simplification. This change also patches the vendored analysisflag package (by adding patch.go) so that it fully supports the build system's -V flag protocol. Also: - remove stale internal/unitchecker/ tree (belonged in https://go-review.googlesource.com/c/149778). - move vet legacy flags (-all, -v, -source, -tags) into analysisflags as all drivers will need them, not just unitchecker. I will upstream this change. A sampling of tests from the cmd/vet testsuite have been preserved as a smoke test, to ensure that each analyzer is being run, and for convenience when evaluating changes. Comprehensive tests for each analyzer live upstream in x/tools. The tests have been heavily reduced and reorganized so that they conform to the structure required by 'go vet'. Change-Id: I84b38caeef733e65deb95234b3b87b5f61046def Reviewed-on: https://go-review.googlesource.com/c/149609Reviewed-by: Russ Cox <rsc@golang.org>
cb413099
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
github.com | ||
golang.org/x | ||
README | ||
update-xtools.sh | ||
vendor.json |