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

Issue 3522041: code review 3522041: govet: a new static checker for Go programs. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 4 months ago by r
Modified:
13 years, 4 months ago
Reviewers:
CC:
rsc, gri, niemeyer, iant2, rog, lstoakes, jacek.masiulaniec_gmail.com, cw, golang-dev
Visibility:
Public.

Description

govet: a new static checker for Go programs. At the moment, and for the forseeable future, it only checks arguments to print calls.

Patch Set 1 #

Total comments: 33

Patch Set 2 : code review 3522041: gocheck: a new static checker for Go programs. #

Patch Set 3 : code review 3522041: gocheck: a new static checker for Go programs. #

Patch Set 4 : code review 3522041: gocheck: a new static checker for Go programs. #

Patch Set 5 : code review 3522041: gocheck: a new static checker for Go programs. #

Total comments: 6

Patch Set 6 : code review 3522041: gocheck: a new static checker for Go programs. #

Patch Set 7 : code review 3522041: gocheck: a new static checker for Go programs. #

Total comments: 1

Patch Set 8 : code review 3522041: govet: a new static checker for Go programs. #

Patch Set 9 : code review 3522041: govet: a new static checker for Go programs. #

Total comments: 7

Patch Set 10 : code review 3522041: govet: a new static checker for Go programs. #

Patch Set 11 : code review 3522041: govet: a new static checker for Go programs. #

Total comments: 1

Patch Set 12 : code review 3522041: govet: a new static checker for Go programs. #

Total comments: 1

Patch Set 13 : code review 3522041: govet: a new static checker for Go programs. #

Patch Set 14 : code review 3522041: govet: a new static checker for Go programs. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+331 lines, -0 lines) Patch
A src/cmd/govet/Makefile View 1 chunk +11 lines, -0 lines 0 comments Download
A src/cmd/govet/doc.go View 8 9 1 chunk +37 lines, -0 lines 0 comments Download
A src/cmd/govet/govet.go View 8 9 10 11 1 chunk +281 lines, -0 lines 0 comments Download
M src/pkg/Makefile View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 35
r
Hello rsc, gri (cc: golang-dev@googlegroups.com), I'd like you to review this change.
13 years, 4 months ago (2010-12-08 21:22:34 UTC) #1
r
Hello rsc, gri (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2010-12-08 21:26:25 UTC) #2
rsc1
http://codereview.appspot.com/3522041/diff/1/src/cmd/gocheck/doc.go File src/cmd/gocheck/doc.go (right): http://codereview.appspot.com/3522041/diff/1/src/cmd/gocheck/doc.go#newcode16 src/cmd/gocheck/doc.go:16: a format descriptor string in the manner of fmt.Printf. ...
13 years, 4 months ago (2010-12-08 21:33:28 UTC) #3
r
Hello rsc, gri (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2010-12-08 21:46:25 UTC) #4
r
http://codereview.appspot.com/3522041/diff/1/src/cmd/gocheck/gocheck.go File src/cmd/gocheck/gocheck.go (right): http://codereview.appspot.com/3522041/diff/1/src/cmd/gocheck/gocheck.go#newcode27 src/cmd/gocheck/gocheck.go:27: var helpString = `By default gocheck checks for functions ...
13 years, 4 months ago (2010-12-08 21:46:38 UTC) #5
r
Hello rsc, gri (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2010-12-08 21:46:53 UTC) #6
rsc1
http://codereview.appspot.com/3522041/diff/1/src/cmd/gocheck/gocheck.go File src/cmd/gocheck/gocheck.go (right): http://codereview.appspot.com/3522041/diff/1/src/cmd/gocheck/gocheck.go#newcode361 src/cmd/gocheck/gocheck.go:361: arg := call.Args[skip] On 2010/12/08 21:46:38, r wrote: > ...
13 years, 4 months ago (2010-12-08 21:59:17 UTC) #7
rsc1
http://codereview.appspot.com/3522041/diff/1/src/cmd/gocheck/gocheck.go File src/cmd/gocheck/gocheck.go (right): http://codereview.appspot.com/3522041/diff/1/src/cmd/gocheck/gocheck.go#newcode161 src/cmd/gocheck/gocheck.go:161: func (f *File) checkFile(name string, file *ast.File) { On ...
13 years, 4 months ago (2010-12-08 22:04:06 UTC) #8
gri
Some comments. Will look at it again more precisely later. http://codereview.appspot.com/3522041/diff/15001/src/cmd/gocheck/gocheck.go File src/cmd/gocheck/gocheck.go (right): http://codereview.appspot.com/3522041/diff/15001/src/cmd/gocheck/gocheck.go#newcode28 ...
13 years, 4 months ago (2010-12-08 22:13:39 UTC) #9
r
Hello rsc, gri (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2010-12-08 22:34:26 UTC) #10
r
I did the rewrite. It's cleaner code; it's also 50% slower, which is interesting. Gri?? ...
13 years, 4 months ago (2010-12-08 22:34:46 UTC) #11
niemeyer
Hi Rob, If possible, I'd appreciate if another name was selected for the tool. gocheck ...
13 years, 4 months ago (2010-12-08 22:37:26 UTC) #12
gri
How about golint? - gri On Wed, Dec 8, 2010 at 2:37 PM, <n13m3y3r@gmail.com> wrote: ...
13 years, 4 months ago (2010-12-08 22:38:28 UTC) #13
r
lint was a total piece of crap with horrible properties that corrupted programmers for a ...
13 years, 4 months ago (2010-12-08 22:43:10 UTC) #14
niemeyer
> otherwise, a fine suggestion. golint goverify gotest --check goguard gostatic gowell gopure gosafe gofit ...
13 years, 4 months ago (2010-12-08 22:49:21 UTC) #15
iant2
n13m3y3r@gmail.com writes: >> otherwise, a fine suggestion. > > golint > goverify > gotest --check ...
13 years, 4 months ago (2010-12-08 22:52:25 UTC) #16
r
On Wed, Dec 8, 2010 at 5:52 PM, Ian Lance Taylor <iant@google.com> wrote: > n13m3y3r@gmail.com ...
13 years, 4 months ago (2010-12-08 22:59:22 UTC) #17
r
oh that thing. dammit. -rob
13 years, 4 months ago (2010-12-08 23:00:28 UTC) #18
r
Hello rsc, gri, niemeyer, iant2 (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2010-12-08 23:00:50 UTC) #19
r
PTAL while we consider throwing it all away. -rob
13 years, 4 months ago (2010-12-08 23:01:19 UTC) #20
r
on further thought, gofmt doesn't seem like a good match. its job is not to ...
13 years, 4 months ago (2010-12-08 23:11:07 UTC) #21
gri
http://codereview.appspot.com/3522041/diff/33001/src/cmd/gocheck/gocheck.go File src/cmd/gocheck/gocheck.go (right): http://codereview.appspot.com/3522041/diff/33001/src/cmd/gocheck/gocheck.go#newcode147 src/cmd/gocheck/gocheck.go:147: return f I think you ought to be able ...
13 years, 4 months ago (2010-12-08 23:11:21 UTC) #22
gri
agreed - I don't want gofmt to become the kitchen sink for everything source code ...
13 years, 4 months ago (2010-12-08 23:12:56 UTC) #23
rog
what about "gowarn"? i.e. a tool that gives you the warnings that the compiler does ...
13 years, 4 months ago (2010-12-08 23:14:39 UTC) #24
r
Hello rsc, gri, niemeyer, iant2, rog (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2010-12-08 23:15:39 UTC) #25
r
Hello rsc, gri, niemeyer, iant2, rog (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2010-12-08 23:16:09 UTC) #26
lstoakes
gocop? .net has 'fxcop' which performs static analysis, seems like a fair analogy! On 8 ...
13 years, 4 months ago (2010-12-08 23:16:56 UTC) #27
r
i chose 'govet', since it vets the code. that is the end of the naming ...
13 years, 4 months ago (2010-12-08 23:17:22 UTC) #28
niemeyer
> i chose 'govet', since it vets the code. > > that is the end ...
13 years, 4 months ago (2010-12-08 23:26:47 UTC) #29
gri
LGTM http://codereview.appspot.com/3522041/diff/46001/src/cmd/govet/doc.go File src/cmd/govet/doc.go (right): http://codereview.appspot.com/3522041/diff/46001/src/cmd/govet/doc.go#newcode29 src/cmd/govet/doc.go:29: is zero-indexed argument position of the first argument ...
13 years, 4 months ago (2010-12-08 23:53:19 UTC) #30
jacekm
http://codereview.appspot.com/3522041/diff/57001/src/cmd/govet/govet.go File src/cmd/govet/govet.go (right): http://codereview.appspot.com/3522041/diff/57001/src/cmd/govet/govet.go#newcode27 src/cmd/govet/govet.go:27: // If --help is set, it prints a longer ...
13 years, 4 months ago (2010-12-09 00:54:32 UTC) #31
cw
http://codereview.appspot.com/3522041/diff/63001/src/cmd/make.bash File src/cmd/make.bash (right): http://codereview.appspot.com/3522041/diff/63001/src/cmd/make.bash#newcode24 src/cmd/make.bash:24: for i in cc ${O}l ${O}a ${O}c gc ${O}g ...
13 years, 4 months ago (2010-12-09 06:49:55 UTC) #32
r
Hello rsc, gri, niemeyer, iant2, rog, lstoakes, jacek.masiulaniec@gmail.com, cw (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2010-12-09 16:17:17 UTC) #33
rsc1
LGTM
13 years, 4 months ago (2010-12-09 17:14:49 UTC) #34
r
13 years, 4 months ago (2010-12-09 17:37:25 UTC) #35
*** Submitted as http://code.google.com/p/go/source/detail?r=752e82357e09 ***

govet: a new static checker for Go programs.
At the moment, and for the forseeable future, it only checks arguments to print
calls.

R=rsc, gri, niemeyer, iant2, rog, lstoakes, jacek.masiulaniec, cw
CC=golang-dev
http://codereview.appspot.com/3522041
Sign in to reply to this message.

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