Skip to content

Commit 19ee0ef

Browse files
committed
Simplify linter output setup
`golangci-lint` now supports an output formatter for GitHub Actions, so we don't need to manually reformat the failure output anymore.
1 parent 230441e commit 19ee0ef

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
go mod verify
3030
go mod download
3131
32-
LINT_VERSION=1.29.0
32+
LINT_VERSION=1.34.1
3333
curl -fsSL https://github.com/golangci/golangci-lint/releases/download/v${LINT_VERSION}/golangci-lint-${LINT_VERSION}-linux-amd64.tar.gz | \
3434
tar xz --strip-components 1 --wildcards \*/golangci-lint
3535
mkdir -p bin && mv golangci-lint bin/
@@ -50,10 +50,6 @@ jobs:
5050
assert-nothing-changed go fmt ./...
5151
assert-nothing-changed go mod tidy
5252
53-
while read -r file linter msg; do
54-
IFS=: read -ra f <<<"$file"
55-
printf '::error file=%s,line=%s,col=%s::%s\n' "${f[0]}" "${f[1]}" "${f[2]}" "[$linter] $msg"
56-
STATUS=1
57-
done < <(bin/golangci-lint run --out-format tab)
53+
bin/golangci-lint run --out-format github-actions || STATUS=$?
5854
5955
exit $STATUS

0 commit comments

Comments
 (0)