Merge pull request #2742 from cli/linter-update

Simplify linter output setup
This commit is contained in:
Mislav Marohnić 2021-01-11 15:32:18 +01:00 committed by GitHub
commit c73845ee22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ jobs:
go mod verify
go mod download
LINT_VERSION=1.29.0
LINT_VERSION=1.34.1
curl -fsSL https://github.com/golangci/golangci-lint/releases/download/v${LINT_VERSION}/golangci-lint-${LINT_VERSION}-linux-amd64.tar.gz | \
tar xz --strip-components 1 --wildcards \*/golangci-lint
mkdir -p bin && mv golangci-lint bin/
@ -50,10 +50,6 @@ jobs:
assert-nothing-changed go fmt ./...
assert-nothing-changed go mod tidy
while read -r file linter msg; do
IFS=: read -ra f <<<"$file"
printf '::error file=%s,line=%s,col=%s::%s\n' "${f[0]}" "${f[1]}" "${f[2]}" "[$linter] $msg"
STATUS=1
done < <(bin/golangci-lint run --out-format tab)
bin/golangci-lint run --out-format github-actions || STATUS=$?
exit $STATUS