From 2a607a24038c794ce58b5f2f8709c456235d5ceb Mon Sep 17 00:00:00 2001 From: Peter Svensson Date: Thu, 7 May 2026 10:54:15 +0200 Subject: [PATCH 1/3] ci: bump golangci-lint to v2.12.2 v2.6.1 was built with Go 1.25 and rejects code targeting Go 1.26 ('Go language version used to build golangci-lint is lower than the targeted Go version'). v2.12.2 is built with Go 1.26 and accepts 1.26 sources. --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index c6e5867..6da8de9 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -29,7 +29,7 @@ jobs: - name: Install golangci-lint run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.6.1 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.12.2 - name: Run golangci-lint run: golangci-lint run --timeout=5m From 412572ed2643ab629900ea59729bb866a3185cbb Mon Sep 17 00:00:00 2001 From: Peter Svensson Date: Thu, 7 May 2026 10:57:19 +0200 Subject: [PATCH 2/3] ci: switch lint workflow to golangci-lint-action install.sh had SHA256 mismatch for v2.12.2 tarball; use official golangci/golangci-lint-action@v9.2.0 instead. --- .github/workflows/lint.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 6da8de9..5e6c0cd 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -27,9 +27,8 @@ jobs: go-version-file: go.mod cache: true - - name: Install golangci-lint - run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.12.2 - - name: Run golangci-lint - run: golangci-lint run --timeout=5m + uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 + with: + version: v2.12.2 + args: --timeout=5m From 833e9538503b57ccc6893c4c3f713a7a06f972d3 Mon Sep 17 00:00:00 2001 From: Peter Svensson Date: Thu, 7 May 2026 11:04:44 +0200 Subject: [PATCH 3/3] fix(lint): use array for goimports local-prefixes golangci-lint v2.12.x schema requires local-prefixes as a list, not a string. v2.6.1 accepted both; newer versions reject the scalar form. --- .golangci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index a9e900a..ca45d9a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,7 +10,8 @@ formatters: - goimports settings: goimports: - local-prefixes: opzkit/database-user-operator + local-prefixes: + - opzkit/database-user-operator linters: # Default linters are already enabled: errcheck, govet, ineffassign, staticcheck, unused