From 6bebcc3b670c75196e59de6f259d9d47d322feea Mon Sep 17 00:00:00 2001 From: bladehan1 Date: Tue, 7 May 2024 17:40:42 +0800 Subject: [PATCH 1/2] chg: upgrade golangci-lint to 1.57.2 --- .github/workflows/lint.yml | 13 ++++++------- .golangci.yml | 10 +++++----- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ce6f823ef..90e5e3179 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,17 +2,16 @@ name: Lint Check on: [pull_request] jobs: - build: + lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install Go - uses: actions/setup-go@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: 1.19.x + go-version: '1.22' - name: "Run lint" - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: - version: v1.41 + version: v1.57.2 args: --timeout=10m only-new-issues: true \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml index 32bdec5b1..0ea0fb9df 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,13 +6,11 @@ run: # default is true. Enables skipping of directories: # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ skip-dirs-use-default: true - skip-files: - - core/genesis_alloc.go linters: disable-all: true enable: - - deadcode + #- deadcode - goconst - goimports - gosimple @@ -21,8 +19,8 @@ linters: - misspell # - staticcheck - unconvert - # - unused - - varcheck + - unused + #- varcheck linters-settings: gofmt: @@ -33,6 +31,8 @@ linters-settings: issues: new: true + exclude-files: + - core/genesis_alloc.go exclude-rules: - path: crypto/blake2b/ linters: From e7c43991ff200461ec9fa46b76a78d8880d5521e Mon Sep 17 00:00:00 2001 From: bladehan1 Date: Tue, 7 May 2024 18:03:15 +0800 Subject: [PATCH 2/2] chg: update lint config --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 90e5e3179..74f2ad397 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.22' + go-version: '1.21' - name: "Run lint" uses: golangci/golangci-lint-action@v6 with: