]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go/internal/test: add an all sentinel to -vet
authorColin Arnott <colin@urandom.co.uk>
Sun, 18 Jul 2021 08:12:23 +0000 (08:12 +0000)
committerJay Conrod <jayconrod@google.com>
Tue, 17 Aug 2021 21:25:51 +0000 (21:25 +0000)
commit3848488f0f9ea597e9fc69cfd8e942ea7cf35311
treecda7c35e0c1ce8b8e14be3f1162616576f9273cf
parentace1730a417bf5cb1662407ef12013ca7e4e5f84
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>
src/cmd/go/alldocs.go
src/cmd/go/internal/test/test.go
src/cmd/go/internal/test/testflag.go
src/cmd/go/testdata/script/test_vet.txt