From 0444e6ad7faa898b7f7a67e4fd0eb57dca542944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B3=B0=E5=8F=8B?= Date: Thu, 19 Jan 2023 14:27:01 +0800 Subject: [PATCH] fix: scroll back golang-lint version from 1.49.0 to 1.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Golang-lint 1.48+(included) uses gofmt based on go 1.9. The result of Gofmt based on go1.9 is different from Gofmt based on go1.18([different](https://github.com/golang/go/issues/54789)). As a result, Golang-lint 1.48+ reports "File is not `gofmt`-ed with `-s` (gofmt)", although gofmt(1.8 based) says the code is ok. Scroll back to golang-lint 1.47.3, which uses gofmt based on go 1.8. In the future, upgrade golang-lint when go version is higher or equal to 1.9. Signed-off-by: 泰友 --- .github/workflows/smoke.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 7afb1f39831..30158b28354 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -36,7 +36,7 @@ jobs: ${{ runner.os }}-golang- - name: Build Contrib run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin v1.49.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin v1.47.3 make -e DOCKER=false nydusify-release make -e DOCKER=false contrib-test - name: Upload Nydusify @@ -116,7 +116,7 @@ jobs: export NYDUS_NYDUSIFY_$version_export=/usr/bin/nydus-$version/nydusify done - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin v1.49.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin v1.47.3 sudo -E make smoke-only nydus-unit-test: