From 19ee0eff0831ce17d5d1979cb46869e3436f8e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 7 Jan 2021 16:16:44 +0100 Subject: [PATCH] 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. --- .github/workflows/lint.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4dc95a4f1..3ba3b3f25 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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