Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/cmd/goimports: spurious blank line in import block #9961

Closed
rsc opened this issue Feb 23, 2015 · 2 comments
Closed

x/tools/cmd/goimports: spurious blank line in import block #9961

rsc opened this issue Feb 23, 2015 · 2 comments

Comments

@rsc
Copy link
Contributor

rsc commented Feb 23, 2015

g% cat /tmp/x.go
package p

import (
    "testing"

    "rsc.io/p"
)

var (
    _ = flag.String
    _ testing.T
    _ p.P
    _ = regexp.Compile
)
g% goimports /tmp/x.go
package p

import (
    "flag"
    "testing"

    "regexp"

    "rsc.io/p"
)

var (
    _ = flag.String
    _ testing.T
    _ p.P
    _ = regexp.Compile
)
g% 

The blank line between "testing" and "regexp" shouldn't be there (and then regexp should be sorted above testing). This appears to be a minimal example.

@bradfitz
Copy link
Contributor

/cc @josharian @griesemer @crawshaw and anybody who likes using the go/ast package.

I'm going to unassign myself so it doesn't look like I'm working on this.

@bradfitz bradfitz removed their assignment Mar 23, 2015
@josharian
Copy link
Contributor

Started.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants