Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
Format and lint go imports with gci (#85)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Dye <[email protected]>
  • Loading branch information
andrewwdye authored Oct 13, 2023
1 parent d80a373 commit 543621a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions boilerplate/flyte/golang_test_targets/download_tooling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ tools=(
"github.com/EngHabu/mockery/cmd/mockery"
"github.com/flyteorg/flytestdlib/cli/pflags@latest"
"github.com/golangci/golangci-lint/cmd/golangci-lint"
"github.com/daixiang0/gci"
"github.com/alvaroloes/enumer"
"github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc"
)
Expand Down
1 change: 1 addition & 0 deletions boilerplate/flyte/golang_test_targets/goimports
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst

goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*" -not -path "./boilerplate/*")
gci write -s standard -s default -s "prefix(github.com/flyteorg)" --custom-order --skip-generated .
10 changes: 10 additions & 0 deletions boilerplate/flyte/golangci_file/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ linters:
- deadcode
- errcheck
- gas
- gci
- goconst
- goimports
- golint
Expand All @@ -28,3 +29,12 @@ linters:
- unparam
- unused
- varcheck

linters-settings:
gci:
custom-order: true
sections:
- standard
- default
- prefix(github.com/flyteorg)
skip-generated: true

0 comments on commit 543621a

Please sign in to comment.