aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/test/test.go
diff options
context:
space:
mode:
authorColin Arnott <colin@urandom.co.uk>2021-07-18 08:12:23 +0000
committerJay Conrod <jayconrod@google.com>2021-08-17 21:25:51 +0000
commit3848488f0f9ea597e9fc69cfd8e942ea7cf35311 (patch)
treecda7c35e0c1ce8b8e14be3f1162616576f9273cf /src/cmd/go/internal/test/test.go
parentace1730a417bf5cb1662407ef12013ca7e4e5f84 (diff)
downloadgo-3848488f0f9ea597e9fc69cfd8e942ea7cf35311.tar.gz
go-3848488f0f9ea597e9fc69cfd8e942ea7cf35311.zip
cmd/go/internal/test: add an all sentinel to -vet
The vet flag either accepts a list of vets to run, or a distinguished value, off, to disable vet during test. By default only 100% reliable checks are run, thus there is no way to run all vets. This change adds another distinguished value, all, that runs every vet, by passing no flags. During development it was discovered that parsing of the -vet flag value is problematic, in that it accepts deprecated flags like -all. The root cause is detailed in #47309, but for now passing distinguished values (all, off) and anything else returns an error. Fixes #45963 Change-Id: I39fafb7d717dad51b507d560b3f6e604510a2881 Reviewed-on: https://go-review.googlesource.com/c/go/+/334873 Trust: Than McIntosh <thanm@google.com> Trust: Jay Conrod <jayconrod@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/internal/test/test.go')
-rw-r--r--src/cmd/go/internal/test/test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/go/internal/test/test.go b/src/cmd/go/internal/test/test.go
index e8bf0e198e..efebc12363 100644
--- a/src/cmd/go/internal/test/test.go
+++ b/src/cmd/go/internal/test/test.go
@@ -78,7 +78,8 @@ binary. Only a high-confidence subset of the default go vet checks are
used. That subset is: 'atomic', 'bool', 'buildtags', 'errorsas',
'ifaceassert', 'nilfunc', 'printf', and 'stringintconv'. 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.
+To disable the running of go vet, use the -vet=off flag. To run all
+checks, use the -vet=all 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