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

Issue 10409047: code review 10409047: go.tools/cmd/vet: add check for shadowed variables (Closed)

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

Description

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 issue 5634.

Patch Set 1 #

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

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

Total comments: 25

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -4 lines) Patch
M cmd/vet/main.go View 1 2 3 9 chunks +23 lines, -3 lines 0 comments Download
A cmd/vet/shadow.go View 1 2 3 1 chunk +227 lines, -0 lines 0 comments Download
A cmd/vet/testdata/shadow.go View 1 2 3 1 chunk +54 lines, -0 lines 0 comments Download
M cmd/vet/types.go View 2 chunks +7 lines, -0 lines 0 comments Download
M cmd/vet/vet_test.go View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 5
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go.tools
4 years, 5 months ago (2013-06-20 03:54:20 UTC) #1
gri
LGTM https://codereview.appspot.com/10409047/diff/5001/cmd/vet/main.go File cmd/vet/main.go (right): https://codereview.appspot.com/10409047/diff/5001/cmd/vet/main.go#newcode29 cmd/vet/main.go:29: var strictShadowing = flag.Bool("shadowstrict", false /*TODO*/, "whether to ...
4 years, 5 months ago (2013-06-21 17:20:34 UTC) #2
r
*** Submitted as https://code.google.com/p/go/source/detail?r=6acfcebcb6c6&repo=tools *** go.tools/cmd/vet: add check for shadowed variables Experimental feature. It's too ...
4 years, 5 months ago (2013-06-21 18:27:56 UTC) #3
r
https://codereview.appspot.com/10409047/diff/5001/cmd/vet/shadow.go File cmd/vet/shadow.go (right): https://codereview.appspot.com/10409047/diff/5001/cmd/vet/shadow.go#newcode8 cmd/vet/shadow.go:8: with the same name and type as a variable ...
4 years, 5 months ago (2013-06-21 18:28:07 UTC) #4
r
4 years, 5 months ago (2013-06-21 18:28:54 UTC) #5
Message was sent while issue was closed.
I had lots more comments that don't appear here. They weren't important, but
yuck.
Sign in to reply to this message.

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