From dca078757299cf56b5c504d9588c8220a3c26acc Mon Sep 17 00:00:00 2001 From: andig Date: Tue, 1 Apr 2025 12:44:21 +0200 Subject: [PATCH] chore: upgrade golangci-lint --- .golangci.yml | 67 +++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 3999f00c8..22a39ff68 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,23 +1,10 @@ +version: "2" run: go: "1.24" - -issues: - exclude: - - .regActualCurrent. is unused - - "`routeLogger` is unused" - -linters-settings: - staticcheck: - checks: - - "-SA1019" - linters: - disable-all: true + default: none enable: - durationcheck - - gci - - gofmt - - goimports - goprintffuncname - govet - importas @@ -29,26 +16,38 @@ linters: - sqlclosecheck - staticcheck - tparallel - - typecheck - unconvert - unused - wastedassign - whitespace - - # fixme - # - dogsled - # - bodyclose - # - exhaustive - # - exportloopref - # - gocritic - # - godot - # - gomoddirectives - # - nakedret - # - nilerr - # - noctx - # - prealloc - # - predeclared - # - revive - # - stylecheck - # - unparam - # - dupl + settings: + staticcheck: + checks: + - -SA1019 + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - path: (.+)\.go$ + text: .regActualCurrent. is unused + - path: (.+)\.go$ + text: '`routeLogger` is unused' + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gci + - gofmt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$