aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlan Donovan <adonovan@google.com>2023-09-20 14:13:35 -0400
committerGopher Robot <gobot@golang.org>2024-03-14 03:12:27 +0000
commitf1d60500bcc48f06c8d322dac1e48dd4c22f5863 (patch)
tree27d971c56a9d4171f961f7a4c2644cdc38d13d6e /doc
parent6133c1e4e202af2b2a6d4873d5a28ea3438e5554 (diff)
downloadgo-f1d60500bcc48f06c8d322dac1e48dd4c22f5863.tar.gz
go-f1d60500bcc48f06c8d322dac1e48dd4c22f5863.zip
cmd/go/internal/test: add 'tests' vet check to 'go test' suite
The tests analyser reports structural problems in test declarations. Presumably most of these would be caught by go test itself, which compiles and runs (some subset of) the tests, but Benchmark and Fuzz functions are executed less frequently and may benefit more from static checks. Also, reflect the change in go test help message. + release note Fixes golang/go#44251 Change-Id: If5b9dee6d18fa0bc4de7f5f5f549eddeae953fc2 Reviewed-on: https://go-review.googlesource.com/c/go/+/529816 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/next/3-tools.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/next/3-tools.md b/doc/next/3-tools.md
index bdbe6c0771..56d82e4926 100644
--- a/doc/next/3-tools.md
+++ b/doc/next/3-tools.md
@@ -10,3 +10,12 @@ or copying the `go` binary.
### Cgo {#cgo}
+### Vet
+
+The new `tests` analyzer reports common mistakes in declarations of
+tests, fuzzers, benchmarks, and examples in test packages, such as
+malformed names, wrong signatures, or examples that document
+non-existent identifiers. Some of these mistakes may cause tests not
+to run.
+
+This analyzer is among the subset of analyzers that are run by `go test`.