aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorSean Liao <sean@liao.dev>2026-03-13 21:05:17 +0000
committerSean Liao <sean@liao.dev>2026-03-16 13:35:24 -0700
commit5262546d8296a6bed3fcd385385db51bd3e5f48b (patch)
treedb851f030926aa7161b53f0909cefca1a0be8a85 /src/cmd
parenta8a5b81473c00e857dd9963dc027dc1c10016d79 (diff)
downloadgo-5262546d8296a6bed3fcd385385db51bd3e5f48b.tar.xz
cmd/go/internal/test: enable stdversion by default
Also, update the list of available checks, including using the non-deprecated names. Updates #18085 Fixes #77729 Change-Id: Ic31a53fda5628f0de85c7f447182f0d4b1cdcdb2 Reviewed-on: https://go-review.googlesource.com/c/go/+/755240 Reviewed-by: Michael Matloob <matloob@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@google.com> Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/go/alldocs.go10
-rw-r--r--src/cmd/go/internal/test/test.go30
2 files changed, 25 insertions, 15 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index 402cbc0ed5..8231261182 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -1875,11 +1875,11 @@
// 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, directive, errorsas,
-// ifaceassert, nilfunc, printf, stringintconv, and tests. 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. To run all
-// checks, use the -vet=all flag.
+// used. That subset is: atomic, bools, buildtag, directive, errorsas,
+// ifaceassert, nilfunc, printf, stdversion, stringintconv, and tests.
+// 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.
+// To run all checks, use the -vet=all 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 9309aa65ed..5c3093a58d 100644
--- a/src/cmd/go/internal/test/test.go
+++ b/src/cmd/go/internal/test/test.go
@@ -78,11 +78,11 @@ 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, directive, errorsas,
-ifaceassert, nilfunc, printf, stringintconv, and tests. 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. To run all
-checks, use the -vet=all flag.
+used. That subset is: atomic, bools, buildtag, directive, errorsas,
+ifaceassert, nilfunc, printf, stdversion, stringintconv, and tests.
+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.
+To run all checks, use the -vet=all 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
@@ -654,31 +654,41 @@ func testShowPass() bool {
var defaultVetFlags = []string{
// TODO(rsc): Decide which tests are enabled by default.
// See golang.org/issue/18085.
+ // "-appends",
// "-asmdecl",
// "-assign",
"-atomic",
- "-bool",
- "-buildtags",
+ "-bools",
+ "-buildtag",
// "-cgocall",
// "-composites",
// "-copylocks",
+ // "-defers",
"-directive",
"-errorsas",
+ // "-framepointer",
+ // "-hostport",
// "-httpresponse",
"-ifaceassert",
+ // "-loopclosure",
// "-lostcancel",
- // "-methods",
"-nilfunc",
"-printf",
- // "-rangeloops",
// "-shift",
+ // "-sigchanyzer",
"-slog",
+ // "-stdmethods",
+ "-stdversion",
"-stringintconv",
- // "-structtags",
+ // "-structtag",
+ // "-testinggoroutine",
"-tests",
+ // "-timeformat",
+ // "-unmarshal",
// "-unreachable",
// "-unsafeptr",
// "-unusedresult",
+ // "-waitgroup",
}
func runTest(ctx context.Context, cmd *base.Command, args []string) {