diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 57a9b112f..83bb4c871 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -18,6 +18,6 @@ jobs: with: go-version-file: go.mod - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v9 with: - version: v1.61.0 + version: v2.11 diff --git a/.golangci.yml b/.golangci.yml index 8be65e2ab..abc5f95eb 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,8 +1,5 @@ -run: - timeout: 5m +version: "2" linters: - disable: - - errcheck enable: - bodyclose - containedctx @@ -11,7 +8,6 @@ linters: - durationcheck - errname - errorlint - - gofmt - misspell - nilerr - nilnil @@ -23,6 +19,27 @@ linters: - sqlclosecheck - unconvert - unparam - - unused - wastedassign - whitespace + disable: + - errcheck + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$