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

Issue 99400043: code review 99400043: go.tools/imports: fix case where output not gofmt-compatible (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by shurcooL
Modified:
9 years, 11 months ago
Reviewers:
bradfitz
CC:
bradfitz, golang-codereviews
Visibility:
Public.

Description

go.tools/imports: fix case where output not gofmt-compatible Fixes 7866. Adds a test case. When trying to add newlines before certain imports via text manipulation, a regex is used to iterate over all imports. The regex failed to match dot imports because \w doesn't match a literal dot. This changes the regex to accept a dot as well.

Patch Set 1 #

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -1 line) Patch
M imports/fix_test.go View 1 1 chunk +43 lines, -0 lines 0 comments Download
M imports/imports.go View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3
shurcooL
Hello bradfitz@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.tools
9 years, 11 months ago (2014-05-20 03:01:51 UTC) #1
bradfitz
LGTM Thanks! On Mon, May 19, 2014 at 8:01 PM, <shurcooL@gmail.com> wrote: > Reviewers: bradfitz, ...
9 years, 11 months ago (2014-05-20 21:02:11 UTC) #2
bradfitz
9 years, 11 months ago (2014-05-20 21:02:18 UTC) #3
*** Submitted as
https://code.google.com/p/go/source/detail?r=fe1f51e06216&repo=tools ***

go.tools/imports: fix case where output not gofmt-compatible

Fixes 7866. Adds a test case.

When trying to add newlines before certain imports via text manipulation,
a regex is used to iterate over all imports. The regex failed to match
dot imports because \w doesn't match a literal dot. This changes the regex
to accept a dot as well.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://codereview.appspot.com/99400043

Committer: Brad Fitzpatrick <bradfitz@golang.org>
Sign in to reply to this message.

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