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

Issue 22170044: code review 22170044: cmd/vet: Support "-" as a filename meaning standard input. (Closed)

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

Description

cmd/vet: Support "-" as a filename meaning standard input. This permits using vet as a filter, or in a situation where you only have a Go source file in memory and don't want to write it to disk.

Patch Set 1 #

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -2 lines) Patch
M cmd/vet/doc.go View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/vet/main.go View 1 3 chunks +12 lines, -2 lines 0 comments Download

Messages

Total messages: 12
dsymonds
Hello r (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.tools
10 years, 4 months ago (2013-11-06 07:26:41 UTC) #1
r
I never liked the "-" thing; that's why I created /dev/stdin. The - is a ...
10 years, 4 months ago (2013-11-06 15:36:59 UTC) #2
rsc
If it doesn't already, vet will eventually need to be changed to work on all ...
10 years, 4 months ago (2013-11-06 17:45:16 UTC) #3
r
Good point. It already handles a full package and is much less effective one file ...
10 years, 4 months ago (2013-11-06 17:56:26 UTC) #4
dsymonds
What about if I special-case "/dev/stdin" instead? I really don't want to be writing files ...
10 years, 4 months ago (2013-11-06 21:04:13 UTC) #5
rsc
just write a temp file. or if you only ever run on unix, you don't ...
10 years, 4 months ago (2013-11-06 21:58:59 UTC) #6
dsymonds
/dev/stdin does not work. Code here checks for a ".go" suffix. That's the only bit ...
10 years, 4 months ago (2013-11-06 22:00:41 UTC) #7
rsc
please just write a temp file then.
10 years, 4 months ago (2013-11-06 22:01:32 UTC) #8
dsymonds
Of course removing the ".go" check would also suit me.
10 years, 4 months ago (2013-11-06 22:02:54 UTC) #9
dsymonds
I'll see how bad it is if I do the write-to-disk approach. It just seems ...
10 years, 4 months ago (2013-11-07 02:20:10 UTC) #10
dsymonds
*** Abandoned ***
10 years, 4 months ago (2013-11-07 02:20:26 UTC) #11
adg
10 years, 4 months ago (2013-11-07 02:24:34 UTC) #12
On 7 November 2013 13:20, David Symonds <dsymonds@golang.org> wrote:

> I can't use govet as a filter


Vet doesn't modify source code, so why would you use it as a filter?
Sign in to reply to this message.

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