diff --git a/.golangci.yml b/.golangci.yml index de159c4..9124d45 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,31 +1,47 @@ +version: "2" + issues: fix: true - # Relax rules for tests - exclude-rules: - - path: _test\.go - linters: - - gocyclo - - errcheck - - dupl - linters: enable: - gocyclo - godot - - gofumpt - - goimports - govet - revive - whitespace - misspell -linters-settings: - gofumpt: - extra-rules: true - gocyclo: - min-complexity: 15 + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + + rules: + - linters: + - dupl + - errcheck + - gocyclo + path: _test\.go + + settings: + godot: + exclude: + - "^ @[A-Za-z]+ " + +formatters: + enable: + - gofumpt + - goimports + + settings: + gofumpt: + extra-rules: true + gocyclo: + min-complexity: 15 - godot: - exclude: - - "^ @[A-Za-z]+ " + exclusions: + generated: lax diff --git a/Makefile b/Makefile index 310e59c..25c229b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: setup-pre-commit-ci setup-pre-commit-ci: # renovate: datasource=github-releases depName=golangci/golangci-lint - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8 + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2 .PHONY: setup setup: setup-pre-commit-ci