From ff440bf04b157dc93c31a94d4ab7b5adffec013c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 09:33:43 +0000 Subject: [PATCH 1/3] Bump golangci/golangci-lint-action from 6 to 7 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6 to 7. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v6...v7) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e706ac60..bf93c267 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -136,7 +136,7 @@ jobs: - run: echo $BUILD_TAG - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v7 with: version: ${{ env.GOLANGCI_LINT_VERSION }} args: --build-tags ${{ env.BUILD_TAG }} --modules-download-mode=readonly From 19481d42b37926f56b1005a25614d17d6261a968 Mon Sep 17 00:00:00 2001 From: sue445 Date: Tue, 25 Mar 2025 18:35:29 +0900 Subject: [PATCH 2/3] Upgrade to golangci-lint v2.0 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf93c267..df17b2fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,8 +22,8 @@ env: GO_TEST_ARGS: -coverprofile coverage.out -covermode atomic TEST_GEM_DIR: ruby/testdata/example/ - # c.f. https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md - GOLANGCI_LINT_VERSION: v1.60 + # c.f. https://github.com/golangci/golangci-lint/blob/main/CHANGELOG.md + GOLANGCI_LINT_VERSION: v2.0 jobs: generate-matrix: From 912d2aff88f8be305d63e68749d80d26519052af Mon Sep 17 00:00:00 2001 From: sue445 Date: Tue, 25 Mar 2025 18:35:57 +0900 Subject: [PATCH 3/3] golangci-lint migrate --- .golangci.yml | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 3a9a9b9c..75c4a444 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,18 +1,31 @@ -linters-settings: - revive: - rules: - - name: exported - arguments: - - disableStutteringCheck - +version: "2" linters: enable: - - gofmt - revive - testifylint - wrapcheck - -issues: - include: - - EXC0012 # EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments - - EXC0014 # EXC0014 revive: Annoying issue about not having a comment. The rare codebase has such comments + settings: + revive: + rules: + - name: exported + arguments: + - disableStutteringCheck + exclusions: + generated: lax + presets: + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$