Skip to content

Commit

Permalink
Enable goimports linter via config
Browse files Browse the repository at this point in the history
  • Loading branch information
aramprice committed Nov 20, 2023
1 parent db243dd commit ddaa44e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ jobs:
with:
go-version-file: go.mod
- uses: golangci/golangci-lint-action@v3
with:
args: --enable goimports
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
run:
timeout: 3m # 1m default times out on github-action runners

linters:
enable:
- goimports

output:
# Sort results by: filepath, line and column.
sort-results: true
2 changes: 1 addition & 1 deletion bin/lint
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ linted_os_list=(linux)

for os in ${linted_os_list[*]}; do
echo -e "\n lint-ing with GOOS=${os}..."
GOOS="${os}" golangci-lint run --enable goimports "${ROOT_DIR}"/...
GOOS="${os}" golangci-lint run "${ROOT_DIR}"/...
done

0 comments on commit ddaa44e

Please sign in to comment.