1
0
mirror of https://github.com/golang/go synced 2024-10-05 05:11:25 -06:00
go/src/cmd
Catalin Nicutar 6e6637bdb4 cmd/vet: add a check for tests with malformed names
According to golang.org/pkg/testing the first character after Test has
to be non-lowercase. Functions that don't conform to this are not
considered tests and are not loaded which can cause surprises.

This change adds a check to warn about Test-like functions in a _test
file that are not actually run by go test.

Moved over from https://go-review.googlesource.com/#/c/19466/

Change-Id: I2f89676058b27a0e35f721bdabc9fa8a9d34430d
Reviewed-on: https://go-review.googlesource.com/19724
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2016-02-24 10:40:34 +00:00
..
addr2line cmd/addr2line: simplify windows test 2015-06-17 14:23:20 +00:00
api cmd/api: fix benchmark to ignore internal packages 2016-02-20 01:58:38 +00:00
asm cmd/asm: remove support for amd64 3DNow! instructions 2016-02-19 01:35:13 +00:00
cgo all: use cannot instead of can not 2016-02-21 15:35:50 +00:00
compile cmd/compile: towards simpler and faster lexing: always use getr 2016-02-24 04:36:25 +00:00
cover cmd/cover: don't overskip children nodes when adding counters 2016-02-22 21:06:57 +00:00
dist cmd/dist: introduce list subcommand to list all supported platforms 2016-02-24 06:41:08 +00:00
doc cmd/doc: handle embedded fields properly 2016-02-22 23:40:02 +00:00
fix cmd/fix: add gotypes module 2015-07-17 01:47:14 +00:00
go all: use cannot instead of can not 2016-02-21 15:35:50 +00:00
gofmt cmd/gofmt: Ignore file not found errors. 2016-02-19 00:13:18 +00:00
internal cmd/compile: keep JMPs around with -N 2016-02-24 00:16:23 +00:00
link cmd/link: typo in error message 2016-02-20 20:16:17 +00:00
newlink cmd/internal/obj/mips: added support for GOARCH=mips64{,le} 2015-11-12 04:42:44 +00:00
nm all: extract "can I exec?" check from tests into internal/testenv 2015-06-16 18:07:36 +00:00
objdump cmd/objdump: skip TestDisasm* for mips64{,le} 2015-09-10 18:27:09 +00:00
pack all: extract "can I exec?" check from tests into internal/testenv 2015-06-16 18:07:36 +00:00
pprof cmd/pprof: fix scaling of "gigabyte" unit 2015-12-17 16:38:28 +00:00
trace cmd/trace: don't fail when no browser is available 2015-08-21 20:02:23 +00:00
vet cmd/vet: add a check for tests with malformed names 2016-02-24 10:40:34 +00:00
yacc cmd/yacc: memory allocation improvements 2015-11-26 17:42:14 +00:00