Skip to content

gofumpt and gofumports regroup imports that gofmt/goimports leave alone #22

@cespare

Description

@cespare

When I run gofumpt or gofumports over our code, the diffs are huge because it regroups all the imports. For instance:

@@ -7,11 +7,10 @@ import (
        "encoding/binary"
        "errors"
        "hash"
+       "liftoff/go/bitset"
        "math"

        "github.com/cespare/xxhash"
-
-       "liftoff/go/bitset"
 )

This happens with gofumpt and with gofumports executed with

gofumpt -w .
gofumports -local 'liftoff/' -w .

but not with gofmt or goimports executed with

gofmt -w .
goimports -local 'liftoff/' -w .

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