[go] cmd/vet: update TestVet to cover all analyzers in vet.Suite

0 views
Skip to first unread message

Alan Donovan (Gerrit)

unread,
Jul 24, 2026, 5:26:55 PM (2 days ago) Jul 24
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Alex Putman, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

Alan Donovan submitted the change

Change information

Commit message:
cmd/vet: update TestVet to cover all analyzers in vet.Suite

The intent of this test was a minimal integration test
of each analyzer, but we have added many over the years
without tests. This CL ensures that the tests exhaustively
cover all the analyzers, and adds minimal missing tests.

Many of the existing tests were renamed to match the analyzer
name exactly. The loopclosure test was deleted in accordance
with the TODO.

This CL also uses proper Go string literal parsing in // ERROR
comments instead of the hackish old logic derived from the
Go compiler.
Change-Id: Ie488fbb525d76f02dfea1a43008208db43d438f2
Reviewed-by: Alex Putman <apu...@golang.org>
Files:
  • R src/cmd/vet/testdata/asmdecl/asm.go
  • R src/cmd/vet/testdata/asmdecl/asm1.s
  • R src/cmd/vet/testdata/bools/bool.go
  • M src/cmd/vet/testdata/buildtag/buildtag.go
  • M src/cmd/vet/testdata/buildtag/buildtag2.go
  • M src/cmd/vet/testdata/buildtag/buildtag5.go
  • R src/cmd/vet/testdata/cgocall/cgo.go
  • R src/cmd/vet/testdata/composites/composite.go
  • R src/cmd/vet/testdata/copylocks/copylock.go
  • A src/cmd/vet/testdata/defers/defers.go
  • A src/cmd/vet/testdata/errorsas/errorsas.go
  • A src/cmd/vet/testdata/framepointer/framepointer.go
  • A src/cmd/vet/testdata/framepointer/framepointer.s
  • A src/cmd/vet/testdata/ifaceassert/ifaceassert.go
  • M src/cmd/vet/testdata/lostcancel/lostcancel.go
  • R src/cmd/vet/testdata/printf/printf.go
  • D src/cmd/vet/testdata/rangeloop/go.mod
  • D src/cmd/vet/testdata/rangeloop/rangeloop.go
  • A src/cmd/vet/testdata/scannererr/scannererr.go
  • A src/cmd/vet/testdata/sigchanyzer/sigchanyzer.go
  • A src/cmd/vet/testdata/sqlrowserr/sqlrowserr.go
  • R src/cmd/vet/testdata/stdmethods/method.go
  • M src/cmd/vet/testdata/stdversion/stdversion.go
  • A src/cmd/vet/testdata/stringintconv/stringintconv.go
  • A src/cmd/vet/testdata/testinggoroutine/testinggoroutine.go
  • R src/cmd/vet/testdata/tests/tests.go
  • R src/cmd/vet/testdata/tests/tests_test.go
  • A src/cmd/vet/testdata/timeformat/timeformat.go
  • A src/cmd/vet/testdata/unreachable/unreachable.go
  • R src/cmd/vet/testdata/unusedresult/unused.go
  • M src/cmd/vet/vet_test.go
Change size: L
Delta: 31 files changed, 325 insertions(+), 225 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ie488fbb525d76f02dfea1a43008208db43d438f2
Gerrit-Change-Number: 804960
Gerrit-PatchSet: 5
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Alex Putman <apu...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages