Skip to content

Commit 1304d98

Browse files
mknyszekgopherbot
authored andcommitted
Revert "cmd/go/internal/test: add 'tests' vet check to 'go test' suite"
This reverts commit f1d6050. Reason for revert: Broke the longtest builders. Change-Id: I5f3510c8ffc24fae5e71fac0a2dbda01ecfe5d5c Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/571695 Reviewed-by: Alan Donovan <[email protected]> Auto-Submit: Michael Knyszek <[email protected]> Reviewed-by: Russ Cox <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 64017d1 commit 1304d98

File tree

4 files changed

+5
-15
lines changed

4 files changed

+5
-15
lines changed

doc/next/3-tools.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,3 @@ or copying the `go` binary.
1010

1111
### Cgo {#cgo}
1212

13-
### Vet
14-
15-
The new `tests` analyzer reports common mistakes in declarations of
16-
tests, fuzzers, benchmarks, and examples in test packages, such as
17-
malformed names, wrong signatures, or examples that document
18-
non-existent identifiers. Some of these mistakes may cause tests not
19-
to run.
20-
21-
This analyzer is among the subset of analyzers that are run by `go test`.

src/cmd/go/alldocs.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ and its test source files to identify significant problems. If go vet
7979
finds any problems, go test reports those and does not run the test
8080
binary. Only a high-confidence subset of the default go vet checks are
8181
used. That subset is: atomic, bool, buildtags, directive, errorsas,
82-
ifaceassert, nilfunc, printf, stringintconv, and tests. You can see
82+
ifaceassert, nilfunc, printf, and stringintconv. You can see
8383
the documentation for these and other vet tests via "go doc cmd/vet".
8484
To disable the running of go vet, use the -vet=off flag. To run all
8585
checks, use the -vet=all flag.
@@ -667,7 +667,7 @@ var defaultVetFlags = []string{
667667
"-slog",
668668
"-stringintconv",
669669
// "-structtags",
670-
"-tests",
670+
// "-tests",
671671
// "-unreachable",
672672
// "-unsafeptr",
673673
// "-unusedresult",
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Tests that invalid examples are ignored.
22
# Verifies golang.org/issue/35284
3-
# Disable vet, as 'tests' analyzer objects to surplus parameter.
4-
go test -vet=off x_test.go
3+
go test x_test.go
54

65
-- x_test.go --
76
package x
@@ -11,4 +10,4 @@ import "fmt"
1110
func ExampleThisShouldNotHaveAParameter(thisShouldntExist int) {
1211
fmt.Println("X")
1312
// Output:
14-
}
13+
}

0 commit comments

Comments
 (0)