1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:48:32 -06:00
Commit Graph

9 Commits

Author SHA1 Message Date
Andrew Gerrand
61d86e98d5 go.tools/cmd/vet: check for recursive stringers
Fixes golang/go#6129.

R=r
CC=golang-dev
https://golang.org/cl/12936046
2013-08-21 11:07:53 +10:00
Andrew Gerrand
74ecc2c09b go.tools/cmd/vet: detect useless function comparisons
Also fix bug in types.go discovered by this check.

Fixes golang/go#5347.

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/13102043
2013-08-20 16:11:01 +10:00
Rob Pike
aecec2f502 go.tools/cmd/vet: the composite test is about keys, not tags
Fix the confusion.
No semantic change, just some renamings.

Fixes golang/go#6017.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/12394043
2013-08-03 12:19:59 +10:00
David Symonds
75919c8eee cmd/vet: avoid panic if no valid inputs are found.
I'd like to make vet work as a filter, but passing /dev/stdin as a
command line argument doesn't work. This at least makes it not panic.

R=r
CC=golang-dev
https://golang.org/cl/11521045
2013-07-22 12:43:11 +10:00
Rob Pike
331c428e76 go.tools/cmd/vet: add check for shadowed variables
Experimental feature. It's too noisy yet to be enabled by default,
so it must be enabled explicitly by
        go tool vet -shadow *.go
or
        go tool vet -shadow directory
(The go command does not know about the -shadow flag.)

Fixes golang/go#5634.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/10409047
2013-06-21 11:27:53 -07:00
Rob Pike
86c0ff156c go.tools/cmd/vet: set the package name unconditionally
A better fix than the one in CL 10400044

R=gri
CC=golang-dev
https://golang.org/cl/10376044
2013-06-18 14:12:51 -07:00
Rob Pike
ce82fb0e23 go.tools/cmd/vet: use directory for pkg.path if path is "."
Before:
        math/big/nat_test.go:688: arg r for printf verb %s of wrong type: ..Word
After:
        math/big/nat_test.go:688: arg r for printf verb %s of wrong type: big.Word

R=gri
CC=golang-dev
https://golang.org/cl/10400044
2013-06-18 14:02:01 -07:00
Rob Pike
08cc526448 go.tools/cmd/vet: update to new go/types package
Now that it's in the same repository as the go/types package we can delete
the mechanism to build it without type checking.

Add a make rule to install it where the go tool can find it.
Why doesn't "go install" take a -o flag?

R=gri
CC=gobot, golang-dev
https://golang.org/cl/9526043
2013-05-20 12:20:05 -07:00
Rob Pike
01f8cd246d go.tools: add go/types, ssa, and cmd/vet
They will be deleted from their current homes once this has landed.
Changes made to import paths to make the code compile, and to find
errchk in the right place in cmd/vet's Makefile.
TODO in a later CL: tidy up vet.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/9495043
2013-05-17 13:20:39 -07:00