1
0
mirror of https://github.com/golang/go synced 2024-11-18 10:14:45 -07:00
go/cmd
Joël Stemmer 913f41fc5f cmd/vet: warn about zero arg index in print format
Argument indexes in a format string are one-based, however vet would not
warn when using a zero-index unless the type of the argument referenced
was not a string. That warning was misleading as it would say the type
was not a string. Vet will now print a correct warning when using a zero
index.

Included are tests for both cases.

Fixes #9752

Change-Id: I285e99990a86a653b4668b0c279d5f5f1c34f7aa
Reviewed-on: https://go-review.googlesource.com/3692
Reviewed-by: Rob Pike <r@golang.org>
2015-02-04 18:31:58 +00:00
..
benchcmp benchmark/parser, cmd/benchcmp: improve names of exported identifiers 2015-01-15 01:28:17 +00:00
callgraph go/ssa: change import path of synthetic test package to "test$main" 2015-01-21 22:21:01 +00:00
cover tools: add import comments. 2014-12-09 22:42:16 +00:00
digraph tools: add import comments. 2014-12-09 22:42:16 +00:00
eg go/loader: improve robustness in face of input errors 2015-02-02 20:01:59 +00:00
godex tools: add import comments. 2014-12-09 22:42:16 +00:00
godoc cmd/godoc: add golang.org/x/build to go-import redirect list 2015-01-21 06:59:18 +00:00
goimports all: update links from code.google.com to new homes 2014-12-12 03:10:55 +00:00
gomvpkg cmd/mvpkg: a package moving tool 2015-01-14 17:37:29 +00:00
gorename cmd/gorename: make Usage documentation sensible in godoc 2014-12-30 16:36:43 +00:00
gotype tools: add import comments. 2014-12-09 22:42:16 +00:00
html2article all: address vet reports 2014-12-29 06:08:34 +00:00
oracle tools: add import comments. 2014-12-09 22:42:16 +00:00
present present: fix References link of talks.golang.org 2015-01-16 16:06:45 +00:00
ssadump go/loader: improve robustness in face of input errors 2015-02-02 20:01:59 +00:00
stringer cmd/stringer: fix ignored error in TestEndToEnd. 2015-01-15 23:10:50 +00:00
tipgodoc cmd/tipgodoc: set GOROOT_BOOTSTRAP environment variable 2015-01-24 16:29:45 +00:00
vet cmd/vet: warn about zero arg index in print format 2015-02-04 18:31:58 +00:00