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

8 Commits

Author SHA1 Message Date
Dominik Honnef
4ffa5eb876 cmd/vet: don't treat fields like variables in rangeloop check
Fixes #13236

Change-Id: If902ac66718e0a0790fab9835921ce4ef980965b
Reviewed-on: https://go-review.googlesource.com/21183
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2016-03-27 05:31:54 +00:00
Brad Fitzpatrick
2ae77376f7 all: link to https instead of http
The one in misc/makerelease/makerelease.go is particularly bad and
probably warrants rotating our keys.

I didn't update old weekly notes, and reverted some changes involving
test code for now, since we're late in the Go 1.5 freeze. Otherwise,
the rest are all auto-generated changes, and all manually reviewed.

Change-Id: Ia2753576ab5d64826a167d259f48a2f50508792d
Reviewed-on: https://go-review.googlesource.com/12048
Reviewed-by: Rob Pike <r@golang.org>
2015-07-11 14:36:33 +00:00
Robert Griesemer
1b8b2c1551 cmd/vet: move cmd/vet into std repo
cp -r x/tools/cmd/vet cmd/vet without any changes.
The next change will adjust the source to use std
repo go/types and friends.

This may (temporarily) break the build; the next
commit (immediately following) will fix it. We do
it in two commits so that we can see the manual
changes.

Change-Id: Ic45dab7066f13923e21f8c61200c8c3fd447b171
Reviewed-on: https://go-review.googlesource.com/10694
Reviewed-by: Rob Pike <r@golang.org>
2015-06-04 21:22:13 +00:00
Rob Pike
249842c8db cmd/vet: delete; it now lives in the go.tools subrepo
R=golang-dev, dsymonds, rsc, iant, dave
CC=golang-dev
https://golang.org/cl/9496043
2013-05-17 13:53:22 -07:00
Rob Pike
31444a796a cmd/vet: move the tests into separate files
Then mark them with a build tag so they're not compiled into the binary.
They are called test_*.go rather than *_test.go because they are not
for go test. Use make test to test the command.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7377052
2013-02-25 16:25:34 -08:00
Rob Pike
d282532901 vet: improve flag handling
Simplify the internal logic for flags controlling what to vet,
by introducing a map of flags that gathers them all together.
This change should simplify the process of adding further flags.

Add a test for untagged struct literals.
Delete a redundant test that was also in the wrong file.
Clean up some ERROR patterns that weren't working.

"make test" passes again.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7305075
2013-02-11 13:33:11 -08:00
David Symonds
5a93fea08e vet: fix rangeloop.
In a range loop, the presence of a value implies the presence of a key.
However, the presence of a value as an *ast.Ident does not imply that
the key is also an *ast.Ident, thus leading to a panic any time the
two argument form is used where the key is not an identifier.

R=golang-dev, adg, r
CC=golang-dev
https://golang.org/cl/6540045
2012-09-20 08:12:47 +10:00
Andrew Gerrand
51e85612f9 vet: add range variable misuse detection
R=fullung, r, remyoudompheng, minux.ma, gri, rsc
CC=golang-dev
https://golang.org/cl/6494075
2012-09-18 14:19:31 -07:00