diff options
author | Colin Arnott <colin@urandom.co.uk> | 2021-07-18 08:12:23 +0000 |
---|---|---|
committer | Jay Conrod <jayconrod@google.com> | 2021-08-17 21:25:51 +0000 |
commit | 3848488f0f9ea597e9fc69cfd8e942ea7cf35311 (patch) | |
tree | cda7c35e0c1ce8b8e14be3f1162616576f9273cf /src/cmd/go/alldocs.go | |
parent | ace1730a417bf5cb1662407ef12013ca7e4e5f84 (diff) | |
download | go-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/alldocs.go')
-rw-r--r-- | src/cmd/go/alldocs.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index ddf7bb5318..592ea4932e 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -1405,7 +1405,8 @@ // 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 |