From 3aa4d6a9639c4d4bd97858c1479d94cdc2b97beb Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 23 Mar 2026 15:49:25 +0100 Subject: [PATCH] Fix golangci-lint v2.11 config: move exclusions out of issues golangci-lint v2.9+ removed exclude-rules and exclude-dirs from the issues section. Move them to linters.exclusions.rules and linters.exclusions.paths respectively. Signed-off-by: Matthias Wessendorf Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 2 +- .golangci.yml | 18 +++++++++--------- catalog/types_test.go | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60a8dca..dd6e4b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/setup-go@v5 with: go-version-file: go.mod - - uses: golangci/golangci-lint-action@v6 + - uses: golangci/golangci-lint-action@v7 with: version: latest diff --git a/.golangci.yml b/.golangci.yml index 7885070..e3b0796 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -26,15 +26,15 @@ linters: - appendAssign - commentFormatting + exclusions: + rules: + - path: _test\.go + linters: + - errcheck + - gocritic + paths: + - vendor + formatters: enable: - gofmt - -issues: - exclude-rules: - - path: _test\.go - linters: - - errcheck - - gocritic - exclude-dirs: - - vendor diff --git a/catalog/types_test.go b/catalog/types_test.go index ab61133..3345d20 100644 --- a/catalog/types_test.go +++ b/catalog/types_test.go @@ -76,14 +76,14 @@ func TestIsOneClick(t *testing.T) { Meta: &Meta{ K8s: &KubernetesExtensions{ CRTemplate: map[string]any{ - "source": map[string]any{ - "type": "ContainerImage", - "containerImage": map[string]any{ - "ref": "test:latest", + "source": map[string]any{ + "type": "ContainerImage", + "containerImage": map[string]any{ + "ref": "test:latest", + }, }, }, }, - }, }, }, want: true,