From 941be55aad15d7f98cfb2b2f7e13fb209d67922c Mon Sep 17 00:00:00 2001 From: Jiri Zizkovsky Date: Thu, 5 Jun 2025 16:37:58 +0200 Subject: [PATCH] actions: bump --- .github/workflows/golangci-lint.yml | 4 +-- .golangci.yml | 49 ++++++++++++++++++----------- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 034fa5a..a94de3d 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -13,6 +13,6 @@ jobs: with: go-version-file: go.mod - name: golangci-lint - uses: wandera/golangci-lint-action@v4 + uses: golangci/golangci-lint-action@v8 with: - version: v1.64.8 + version: v2.1 diff --git a/.golangci.yml b/.golangci.yml index 50b3a19..fc75c69 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,27 +1,38 @@ -run: - timeout: 5m +version: "2" linters: - disable-all: true + default: none enable: - - gosimple + - godot + - gosec - govet - ineffassign - staticcheck - - typecheck + - unparam - unused - - gofmt - - gci - - godot - - gofumpt - whitespace - -issues: - exclude-rules: - # Exclude some linters from running on tests files. - - path: _test\.go - linters: - - ineffassign - + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: - linters: - - staticcheck - text: "SA4006:" #SA4006: this value of `not_used` is never used (staticcheck) + - gosec + - ineffassign + path: _test\.go + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gci + - gofumpt + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$