Skip to content

x/tools/cmd/goimports: adds redundant aliases #30051

@speedyhoon

Description

@speedyhoon

What version of Go are you using?

go1.11.1 windows/amd64 (Windows 10)

Does this issue reproduce with the latest release?

Yes

What did you do?

run goimports in the current directory.
goimports .

What did you expect to see?

package main

import "github.com/speedyhoon/v8"

func main() {
        v8.Str(nil, "")
}

What did you see instead?

package main

import v8 "github.com/speedyhoon/v8"

func main() {
        v8.Str(nil, "")
}

I named this package "v8", abbreviated from "validation". (okay the name might be a little short)
The package name seems to be colliding with assumptions around goimports matching a versioning pattern like: ^v[0-9]+$
However the alias in this case is redundant because it matches the package name exactly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions