From 9d077c49efd9f27e68f12f01624c7fb6c4571e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Sat, 9 May 2026 12:49:17 +0200 Subject: [PATCH] chore: migrate .golangci.yml to v2 format golangci-lint v2 requires a `version: "2"` field in the config file. Without it, the linter refuses to run: Error: can't load config: unsupported version of the configuration Generated with `golangci-lint migrate`. Notable changes: - `gofumpt` moved from linters to formatters (v2 distinction) - `run.timeout` removed (disabled by default in v2) - default exclusion presets added Co-authored-by: Cursor --- .golangci.yml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index bdb4c715..332ce3b9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,12 +1,28 @@ # For documentation, see https://golangci-lint.run/usage/configuration/ - -run: - timeout: 5m - +version: "2" linters: enable: - - gofumpt - errorlint + - revive - unconvert - unparam - - revive + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofumpt + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$