From: smasher164 Date: Wed, 6 May 2020 18:02:29 +0000 (-0400) Subject: cmd/go: enable stringintconv and ifaceassert vet checks by default X-Git-Tag: go1.15beta1~153 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b819adfe6d3bb53b1c863d5c5a8b64b89698d9f7;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick Reviewed-by: Ian Lance Taylor --- diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 81b4687a6a..5c1f7254bf 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -1313,10 +1313,10 @@ // 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 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",