From: Alberto Donizetti Date: Mon, 16 Apr 2018 09:05:47 +0000 (+0200) Subject: cmd/go: document which vet tests are enabled during go test X-Git-Tag: go1.11beta1~747 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4e6fe7138004990ce452053d6c5a4f191a7a6cb2;p=gostls13.git cmd/go: document which vet tests are enabled during go test Update #18085 Fixes #24009 Change-Id: I655ad76284480002f8d49da269be92ded306128b Reviewed-on: https://go-review.googlesource.com/107077 Reviewed-by: Rob Pike --- diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 8cceb7d231..0eb1a07240 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -755,9 +755,12 @@ // // As part of building a test binary, go test runs go vet on the package // and its test source files to identify significant problems. If go vet -// finds any problems, go test reports those and does not run the test binary. -// Only a high-confidence subset of the default go vet checks are used. -// To disable the running of go vet, use the -vet=off flag. +// finds any problems, go test reports those and does not run the test +// binary. Only a high-confidence subset of the default go vet checks are +// used. That subset is: 'atomic', 'bool', 'buildtags', 'nilfunc', and +// 'printf'. You can see the documentation for these and other vet tests +// via "go doc cmd/vet". To disable the running of go vet, use the +// -vet=off flag. // // All test output and summary lines are printed to the go command's // standard output, even if the test printed them to its own standard diff --git a/src/cmd/go/internal/test/test.go b/src/cmd/go/internal/test/test.go index 7244717d73..d9931a333e 100644 --- a/src/cmd/go/internal/test/test.go +++ b/src/cmd/go/internal/test/test.go @@ -76,9 +76,12 @@ to hold ancillary data needed by the tests. As part of building a test binary, go test runs go vet on the package and its test source files to identify significant problems. If go vet -finds any problems, go test reports those and does not run the test binary. -Only a high-confidence subset of the default go vet checks are used. -To disable the running of go vet, use the -vet=off flag. +finds any problems, go test reports those and does not run the test +binary. Only a high-confidence subset of the default go vet checks are +used. That subset is: 'atomic', 'bool', 'buildtags', 'nilfunc', and +'printf'. You can see the documentation for these and other vet tests +via "go doc cmd/vet". To disable the running of go vet, use the +-vet=off flag. All test output and summary lines are printed to the go command's standard output, even if the test printed them to its own standard