1
0
mirror of https://github.com/golang/go synced 2024-11-19 05:24:42 -07:00
go/cmd
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
..
cover go.tools/cover: split parsing code out from cmd/cover 2013-12-03 20:55:21 -08:00
godoc godoc: add search results that point to documentation instead of source. 2013-11-21 11:55:42 -05:00
gotype go.tools/go/types: move gcimporter to its own package 2013-11-14 14:11:43 -08:00
html2article go.tools/cmd/html2article: move command from go.blog repository 2013-09-27 10:40:53 +10:00
oracle go.tools/cmd/oracle: output help messages to stderr for consistency 2013-12-03 17:37:59 -05:00
ssadump go.tools/ssa: CreateTestMainPackage: synthesize test driver as a package ("testmain") not 'main' function. 2013-10-23 18:07:53 -04:00
vet cmd/vet: check for sync types being copied during function calls 2013-12-09 20:14:28 -08:00