aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/test/test.go
diff options
context:
space:
mode:
authorsmasher164 <aindurti@gmail.com>2020-05-06 14:02:29 -0400
committerIan Lance Taylor <iant@golang.org>2020-05-13 18:00:00 +0000
commitb819adfe6d3bb53b1c863d5c5a8b64b89698d9f7 (patch)
treeb10f479e76a6779f807f9a99100c827ac931a525 /src/cmd/go/internal/test/test.go
parentee0d40cba454c32876a8730d7029bfa6db073735 (diff)
downloadgo-b819adfe6d3bb53b1c863d5c5a8b64b89698d9f7.tar.gz
go-b819adfe6d3bb53b1c863d5c5a8b64b89698d9f7.zip
cmd/go: enable stringintconv and ifaceassert vet checks by default
As per discussion on the accepted proposals, enable these vet checks by default in the go command. Update corresponding documentation as well. Updates #32479. Updates #4483. Change-Id: Ie93471930c24dbb9bcbf7da5deaf63bc1a97a14f Reviewed-on: https://go-review.googlesource.com/c/go/+/232660 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/go/internal/test/test.go')
-rw-r--r--src/cmd/go/internal/test/test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cmd/go/internal/test/test.go b/src/cmd/go/internal/test/test.go
index 48a873e46b..880da2891c 100644
--- a/src/cmd/go/internal/test/test.go
+++ b/src/cmd/go/internal/test/test.go
@@ -73,10 +73,10 @@ As part of building a test binary, go test runs go vet on the package
and its test source files to identify significant problems. If go vet
finds any problems, go test reports those and does not run the test
binary. Only a high-confidence subset of the default go vet checks are
-used. That subset is: 'atomic', 'bool', 'buildtags', 'nilfunc', and
-'printf'. 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.
+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.
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
@@ -548,12 +548,14 @@ var defaultVetFlags = []string{
// "-copylocks",
"-errorsas",
// "-httpresponse",
+ "-ifaceassert",
// "-lostcancel",
// "-methods",
"-nilfunc",
"-printf",
// "-rangeloops",
// "-shift",
+ "-stringintconv",
// "-structtags",
// "-tests",
// "-unreachable",