Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(158)

Issue 10336044: code review 10336044: go.tools/cmd/vet: check for missing printf verb (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by r
Modified:
11 years, 11 months ago
Reviewers:
dsymonds
CC:
dsymonds, golang-dev
Visibility:
Public.

Description

go.tools/cmd/vet: check for missing printf verb A trailing % resulted in a bad error message. Also clean up a couple of dregs left over from the refactoring to add indexed formats.

Patch Set 1 #

Total comments: 2

Patch Set 2 : diff -r 959016818b05 https://code.google.com/p/go.tools #

Total comments: 1

Patch Set 3 : diff -r 959016818b05 https://code.google.com/p/go.tools #

Patch Set 4 : diff -r 959016818b05 https://code.google.com/p/go.tools #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -27 lines) Patch
M cmd/vet/print.go View 1 2 11 chunks +40 lines, -24 lines 0 comments Download
M cmd/vet/testdata/print.go View 1 2 3 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 12
r
Hello dsymonds (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.tools
11 years, 11 months ago (2013-06-17 18:17:21 UTC) #1
dsymonds
https://codereview.appspot.com/10336044/diff/1/cmd/vet/testdata/print.go File cmd/vet/testdata/print.go (right): https://codereview.appspot.com/10336044/diff/1/cmd/vet/testdata/print.go#newcode128 cmd/vet/testdata/print.go:128: fmt.Sprintf("%[3]d", 2) // ERROR "wrong number of args for ...
11 years, 11 months ago (2013-06-17 23:46:27 UTC) #2
r
https://codereview.appspot.com/10336044/diff/1/cmd/vet/testdata/print.go File cmd/vet/testdata/print.go (right): https://codereview.appspot.com/10336044/diff/1/cmd/vet/testdata/print.go#newcode128 cmd/vet/testdata/print.go:128: fmt.Sprintf("%[3]d", 2) // ERROR "wrong number of args for ...
11 years, 11 months ago (2013-06-18 00:38:44 UTC) #3
r
Hello dsymonds@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 11 months ago (2013-06-18 00:38:48 UTC) #4
dsymonds
sorry, I realise this is a bit like nailing jelly to a wall. https://codereview.appspot.com/10336044/diff/5001/cmd/vet/testdata/print.go File ...
11 years, 11 months ago (2013-06-18 02:23:45 UTC) #5
r
Printf("%s %s", 2) it could be "wrong number of args". i was trying to be ...
11 years, 11 months ago (2013-06-18 03:57:41 UTC) #6
dsymonds
On 18 June 2013 13:57, Rob Pike <r@golang.org> wrote: > Printf("%s %s", 2) > > ...
11 years, 11 months ago (2013-06-18 03:59:40 UTC) #7
r
Hello dsymonds@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 11 months ago (2013-06-18 06:05:05 UTC) #8
dsymonds
LGTM
11 years, 11 months ago (2013-06-18 06:22:44 UTC) #9
r
*** Submitted as https://code.google.com/p/go/source/detail?r=e3e3e4be74ef&repo=tools *** go.tools/cmd/vet: check for missing printf verb A trailing % resulted ...
11 years, 11 months ago (2013-06-18 15:21:11 UTC) #10
dsymonds
This latest code is still producing extra output. For a line of code such as ...
11 years, 11 months ago (2013-06-20 04:09:30 UTC) #11
r
11 years, 11 months ago (2013-06-20 17:30:41 UTC) #12
I can't reproduce this. At tip, I see only one message:

testdata/print.go:160: missing argument for Errorf verb %v: need 1, only have 0

The 'only' is silly and I'll delete that word on the next refresh.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b