]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: enable stringintconv and ifaceassert vet checks by default
authorsmasher164 <aindurti@gmail.com>
Wed, 6 May 2020 18:02:29 +0000 (14:02 -0400)
committerIan Lance Taylor <iant@golang.org>
Wed, 13 May 2020 18:00:00 +0000 (18:00 +0000)
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>
src/cmd/go/alldocs.go
src/cmd/go/internal/test/test.go

index 81b4687a6accb7029b884c50796006fe102da641..5c1f7254bf7b8da173988d28710aa4c4bcf0a740 100644 (file)
 // 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
index 48a873e46b14f30e305b38f4915f4d4aea521ea2..880da2891cd4fe9f14e7a94017c965885566ad5d 100644 (file)
@@ -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",