Skip to content

Internal imports mixed with std imports #117

@lewislbr

Description

@lewislbr

Hello, thanks for this package, this is what the go fmt should be! 😬

I've recently installed and ran into this issue:

The internal imports are treated as if they were standard library imports and are grouped together alphabetically.

gofumpt version: v0.1.1
Go version: go1.16.2 darwin/amd64

Expected result:

import (
	"stdpackage"

	"internal/foo"
	
	"third-party-package/baz"
)

Actual result:

import (
        "internal/foo"
	"stdpackage"
	
	"third-party-package/baz"
)

Video:

Screen.Recording.2021-03-25.at.19.21.48.mov

Test repo:

gofumpt-test.zip

Additionally, third-party imports are not grouped if they have at least a blank line between them:

Screen.Recording.2021-03-25.at.19.40.00.mov

Let me know if it can be replicated and if I can help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions