]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/test: pass only analysis flags to vet
authorZvonimir Pavlinovic <zpavlinovic@google.com>
Wed, 11 Aug 2021 20:47:07 +0000 (13:47 -0700)
committerZvonimir Pavlinovic <zpavlinovic@google.com>
Wed, 22 Sep 2021 22:55:16 +0000 (22:55 +0000)
commit1319b1476ea6f55c780936d133a005054fa81234
treeca72d8b38f1154db16c4ee2f892a7d6df045f99d
parent333f3de2a10f22269b567d82144ab3528a3e6c07
cmd/go/internal/test: pass only analysis flags to vet

In go test vet=x, x should be off, all, or one of the analyses supported
by vet. All other flags should not be passed to vet. This CL maintains a
list of supported vet analyzers by running go tool vet -flags and
parsing the flag info to figure out the names of the supported analyzers
and their aliases.

Fixes #47309

Change-Id: I16ade8024301ad4aee5ad45aa92cf63b63dbc2d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/341334
Trust: Zvonimir Pavlinovic <zpavlinovic@google.com>
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/test/flagdefs.go
src/cmd/go/internal/test/flagdefs_test.go
src/cmd/go/internal/test/genflags.go
src/cmd/go/internal/test/internal/genflags/vetflag.go [new file with mode: 0644]
src/cmd/go/internal/test/testflag.go
src/cmd/go/testdata/script/test_vet.txt