]> Cypherpunks repositories - gostls13.git/commit
cmd/go: disable automatic go vet -unreachable during go test of std
authorRuss Cox <rsc@golang.org>
Mon, 22 Jun 2020 18:45:35 +0000 (14:45 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 12 Oct 2020 17:39:47 +0000 (17:39 +0000)
commitaeae46a7e51921b6af1dc1400bdc341fc1e568b0
tree7d966c84fd1be19ceee7778e35391e7247b51425
parent1aa43a53be83c3eaa468cae4914a55878fb2dad9
cmd/go: disable automatic go vet -unreachable during go test of std

go test runs a limited number of vet checks by default.
In the standard library, we run more, both to get additional checking
for the standard library and to get experience with whether to enable
any others by default.

One that experience has shown us should not be enabled by default
is go vet -unreachable. When you are testing, it is common to want to
put an early return or a panic into code to bypass a section of code.
That often causes unreachable code. It's incredibly frustrating if the
result is an "unreachable code" error that keeps your test from completing.

Change-Id: Ib194e87759eb65f5a193d771a9880b38d2fd3ba9
Reviewed-on: https://go-review.googlesource.com/c/go/+/240550
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/work/exec.go
src/cmd/go/testdata/script/vet_flags.txt