Skip to content

Commit

Permalink
fix: scroll back golang-lint version from 1.49.0 to 1.47.3
Browse files Browse the repository at this point in the history
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](golang/go#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: 泰友 <cuichengxu.ccx@antgroup.com>
  • Loading branch information
泰友 committed Jan 19, 2023
1 parent dcf79ef commit 54f7908
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion smoke/tests/tool/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (d *DescartesItem) Str() string {
// Register("name", []interface{}{"foo", "imoer", "morgan"}).
// Register("age", []interface{}{"20", "30"}).
// Skip(func(item *tool.DescartesItem) bool {
// // skip ("morgan", "30")
// // skip ("morgan", "30")
// return item.GetString("name") == "morgan" && param.GetString("age") == "30"
// })
//
Expand Down

0 comments on commit 54f7908

Please sign in to comment.