1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:44:42 -07:00
The Go programming language
Go to file
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
astutil go.tools/importer: move PathEnclosingInterval to package astutil. 2013-12-09 09:36:29 -05:00
blog go.tools/blog: strip prefix when serving static content 2013-11-08 13:28:32 +11:00
call go.tools/pointer: use new callgraph API. 2013-09-25 17:17:42 -04:00
cmd cmd/vet: check for sync types being copied during function calls 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
dashboard go.tools/dashboard/app: only accept commits when given master key 2013-12-09 14:33:08 +11:00
go go/tools/go/gcimporter: avoid possible endless loops in case of errors 2013-12-09 15:43:31 -08:00
godoc godoc: Add URLForSrcQuery option to godoc.Presentation. 2013-12-04 10:37:01 -05:00
importer go.tools/importer: move PathEnclosingInterval to package astutil. 2013-12-09 09:36:29 -05:00
oracle go.tools/importer: move PathEnclosingInterval to package astutil. 2013-12-09 09:36:29 -05:00
playground go.tools/present: add support for non Go code execution 2013-10-14 14:14:08 -07:00
pointer go.tools/pointer: replace Pointer, PointsToSet interfaces with their sole implementations. 2013-12-06 12:52:04 -05:00
present go.tools/present: add Raw content to Code for new go-tour. 2013-11-26 10:04:08 +01:00
ssa go.tools/importer: move PathEnclosingInterval to package astutil. 2013-12-09 09:36:29 -05:00
.hgignore go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
AUTHORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
codereview.cfg go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
CONTRIBUTORS go.empty: prototype for new subrepository 2012-01-25 14:45:13 -05:00
LICENSE LICENSE: add 2012-03-17 15:20:58 +11:00
PATENTS go.empty: add PATENTS file to the subrepo. 2012-04-16 11:24:04 +10:00
README go.tools/README: minor correction. 2013-10-29 13:20:58 -04:00

This subrepository holds the source for various packages and tools that support
the Go programming language.

Some of the tools, godoc and vet for example, are included in binary Go distributions.
Others, including the Go oracle and the test coverage tool, can be fetched with "go get".

Packages include a type-checker for Go and an implementation of the
Static Single Assignment form (SSA) representation for Go programs.

To submit changes to this repository, see http://golang.org/doc/contribute.html.