From b09596ef474b2ad0ad2154416fe406f34859b71f Mon Sep 17 00:00:00 2001 From: Jack Shaw Date: Wed, 30 Aug 2023 09:26:17 +0800 Subject: [PATCH] Rev golangci-lint --- .github/workflows/static-analysis.yml | 2 +- tests/suites/static_analysis/lint_go.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4061978eb8b..d571966ece0 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -56,7 +56,7 @@ jobs: libdqlite-dev \ libsqlite3-dev \ sqlite3 - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.3 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2 sudo snap install shfmt - name: Download Dependencies diff --git a/tests/suites/static_analysis/lint_go.sh b/tests/suites/static_analysis/lint_go.sh index cea4754b975..059870bc032 100644 --- a/tests/suites/static_analysis/lint_go.sh +++ b/tests/suites/static_analysis/lint_go.sh @@ -1,7 +1,7 @@ run_go() { VER=$(golangci-lint --version | tr -s ' ' | cut -d ' ' -f 4 | cut -d '.' -f 1,2) - if [[ ${VER} != "1.53" ]] && [[ ${VER} != "v1.53" ]]; then - (echo >&2 -e '\nError: golangci-lint version does not match 1.53. Please upgrade/downgrade to the right version.') + if [[ ${VER} != "1.54" ]] && [[ ${VER} != "v1.54" ]]; then + (echo >&2 -e '\nError: golangci-lint version does not match 1.54. Please upgrade/downgrade to the right version.') exit 1 fi OUT=$(golangci-lint run -c .github/golangci-lint.config.yaml 2>&1)