From f6ba02e89213dd2305fd0bcf7f88d0c60922c567 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Wed, 30 Sep 2026 01:42:00 +0100 Subject: [PATCH] ci(lint): migrate golangci config to the v2 schema The config used v1 keys under a v2 header, so golangci-lint config verify rejected it and the Lint job failed. This change moves the exclusions to linters.exclusions and the output order to output.sort-order. The old linter settings never took effect. Enforcing them reports 62 issues in the current code. Only the staticcheck setting stays, because it reports none. The gocyclo, errcheck and govet settings need a separate cleanup. --- .golangci.yml | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index eda071a..b01e50e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,7 +2,7 @@ version: "2" run: timeout: 5m - go: '1.25' + go: '1.26' linters: enable: @@ -13,32 +13,26 @@ linters: - unused # Check for unused code - gocyclo # Check cyclomatic complexity - misspell # Check for misspelled words + settings: + staticcheck: + checks: ["all"] + exclusions: + rules: + # Exclude some linters from running on tests + - path: _test\.go + linters: + - gocyclo + - errcheck + - gosec formatters: enable: - gofmt # Check formatting -linters-settings: - gocyclo: - min-complexity: 15 - errcheck: - check-blank: true - govet: - enable-all: true - staticcheck: - checks: ["all"] - issues: - exclude-rules: - # Exclude some linters from running on tests - - path: _test\.go - linters: - - gocyclo - - errcheck - - gosec - max-issues-per-linter: 0 max-same-issues: 0 output: - sort-results: true + sort-order: + - file