1
0
mirror of https://github.com/golang/go synced 2024-09-30 22:58:34 -06:00
go/cmd/vet/testdata
Josh Bleecher Snyder 866b24e166 cmd/vet: check for sync types being copied during function calls
Using a type containing a sync type directly
in a function call (whether as a receiver,
a param, or a return value) is an easy way
to accidentally copy a lock or other sync primitive.
Check for it.

The test as implemented does not provide 100%
coverage; see the discussion near the bottom of
testdata/copylock.go for shortcomings.

Fixes golang/go#6729.

R=adg, r, dsymonds
CC=golang-dev
https://golang.org/cl/23420043
2013-12-09 20:14:28 -08:00
..
asm1.s go.tools/cmd/vet: use "go test" to test 2013-05-22 10:20:50 -07:00
asm2.s go.tools/cmd/vet: use "go test" to test 2013-05-22 10:20:50 -07:00
asm3.s go.tools/cmd/vet: use "go test" to test 2013-05-22 10:20:50 -07:00
asm4.s go.tools/cmd/vet: handle symbolic TEXT annotations 2013-11-01 11:49:11 -07:00
asm.go go.tools/cmd/vet: handle symbolic TEXT annotations 2013-11-01 11:49:11 -07:00
assign.go go.tools/cmd/vet: use "go test" to test 2013-05-22 10:20:50 -07:00
atomic.go go.tools/cmd/vet: use "go test" to test 2013-05-22 10:20:50 -07:00
buildtag_bad.go go.tools/cmd/vet: use "go test" to test 2013-05-22 10:20:50 -07:00
buildtag.go go.tools/cmd/vet: use "go test" to test 2013-05-22 10:20:50 -07:00
composite.go go.tools/cmd/vet: the composite test is about keys, not tags 2013-08-03 12:19:59 +10:00
copylock.go cmd/vet: check for sync types being copied during function calls 2013-12-09 20:14:28 -08:00
deadcode.go go.tools/cmd/vet: use "go test" to test 2013-05-22 10:20:50 -07:00
method.go go.tools/cmd/vet: use "go test" to test 2013-05-22 10:20:50 -07:00
nilfunc.go go.tools/cmd/vet: fix build of testdata package 2013-08-21 11:08:25 +10:00
print.go go.tools/go/types: nil is not a constant + misc. cleanups 2013-10-09 14:17:25 -07:00
rangeloop.go go.tools/cmd/vet: use "go test" to test 2013-05-22 10:20:50 -07:00
shadow.go go.tools/cmd/vet: fix build of testdata package 2013-08-21 11:08:25 +10:00
structtag.go go.tools/cmd/vet: use "go test" to test 2013-05-22 10:20:50 -07:00