Skip to content

Commit 4e6fe71

Browse files
committed
cmd/go: document which vet tests are enabled during go test
Update #18085 Fixes #24009 Change-Id: I655ad76284480002f8d49da269be92ded306128b Reviewed-on: https://go-review.googlesource.com/107077 Reviewed-by: Rob Pike <[email protected]>
1 parent 1f5a0e8 commit 4e6fe71

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/cmd/go/alldocs.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -755,9 +755,12 @@
755755
//
756756
// As part of building a test binary, go test runs go vet on the package
757757
// and its test source files to identify significant problems. If go vet
758-
// finds any problems, go test reports those and does not run the test binary.
759-
// Only a high-confidence subset of the default go vet checks are used.
760-
// To disable the running of go vet, use the -vet=off flag.
758+
// finds any problems, go test reports those and does not run the test
759+
// binary. Only a high-confidence subset of the default go vet checks are
760+
// used. That subset is: 'atomic', 'bool', 'buildtags', 'nilfunc', and
761+
// 'printf'. You can see the documentation for these and other vet tests
762+
// via "go doc cmd/vet". To disable the running of go vet, use the
763+
// -vet=off flag.
761764
//
762765
// All test output and summary lines are printed to the go command's
763766
// standard output, even if the test printed them to its own standard

src/cmd/go/internal/test/test.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,12 @@ to hold ancillary data needed by the tests.
7676
7777
As part of building a test binary, go test runs go vet on the package
7878
and its test source files to identify significant problems. If go vet
79-
finds any problems, go test reports those and does not run the test binary.
80-
Only a high-confidence subset of the default go vet checks are used.
81-
To disable the running of go vet, use the -vet=off flag.
79+
finds any problems, go test reports those and does not run the test
80+
binary. Only a high-confidence subset of the default go vet checks are
81+
used. That subset is: 'atomic', 'bool', 'buildtags', 'nilfunc', and
82+
'printf'. You can see the documentation for these and other vet tests
83+
via "go doc cmd/vet". To disable the running of go vet, use the
84+
-vet=off flag.
8285
8386
All test output and summary lines are printed to the go command's
8487
standard output, even if the test printed them to its own standard

0 commit comments

Comments
 (0)