Skip to content

Commit 1b3de63

Browse files
committed
Use github.com/daixiang0/gci to sort imports
1 parent dd60420 commit 1b3de63

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ format:
3535
.PHONY: format
3636

3737
imports:
38-
which goimports || go install -mod=mod golang.org/x/tools/cmd/goimports@latest
39-
go list ./... | sed "s|^github.com/openshift/cluster-version-operator/||" | xargs goimports -w -local "k8s.io,github.com/openshift"
40-
go list ./... | sed "s|^github.com/openshift/cluster-version-operator/||" | xargs goimports -w -local "github.com/openshift/cluster-version-operator"
38+
which gci || go install -mod=mod github.com/daixiang0/gci@latest
39+
gci write --custom-order -s standard -s default -s "prefix(k8s.io)" -s "prefix(github.com/openshift)" -s localmodule --skip-vendor .
4140
.PHONY: imports
4241

4342
verify: verify-yaml verify-update

0 commit comments

Comments
 (0)