From 7587c2030cfb086663e5bbf94ee8dc52b8b8f927 Mon Sep 17 00:00:00 2001 From: Dan Revie Date: Fri, 10 Apr 2026 11:11:58 -0400 Subject: [PATCH 1/4] fix(ci): bump golangci-lint to v1.64.8 for Go 1.24 support golangci-lint v1.62.2 was built with Go 1.23 and fails on projects targeting Go 1.24.2. Bumps to v1.64.8 (latest v1) and updates the GitHub Action to v6.5.2. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4482c89..b6c21f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,9 +28,9 @@ jobs: run: make test-coverage - name: Run linter - uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 + uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2 with: - version: v1.62.2 + version: v1.64.8 - name: Check formatting run: | From 9d05c073b8141eff6efe98663f1fc5cf8cb5b2cf Mon Sep 17 00:00:00 2001 From: Dan Revie Date: Fri, 10 Apr 2026 11:17:28 -0400 Subject: [PATCH 2/4] fix(ci): update golangci-lint config for v1.64 compatibility Fixes deprecated config options removed in golangci-lint v1.64: - run.skip-dirs/skip-files -> issues.exclude-dirs/exclude-files - linters-settings.govet.check-shadowing (removed) - linters-settings.unused.check-exported (removed) - output.format -> output.formats, removed uniq-by-line Co-Authored-By: Claude Opus 4.6 (1M context) --- .golangci.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 816f707..3b5dc44 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,11 +3,6 @@ run: timeout: 5m tests: true - skip-dirs: - - vendor - - protos/block # Generated protobuf code - skip-files: - - ".*\\.pb\\.go$" # Skip generated protobuf files linters-settings: errcheck: @@ -15,7 +10,6 @@ linters-settings: check-blank: true govet: - check-shadowing: true enable-all: true gofmt: @@ -62,8 +56,6 @@ linters-settings: stylecheck: checks: ["all", "-ST1003"] # Disable underscores in names (we use them for test mocks) - unused: - check-exported: false linters: disable-all: true @@ -99,6 +91,11 @@ linters: - whitespace issues: + exclude-dirs: + - vendor + - protos/block # Generated protobuf code + exclude-files: + - ".*\\.pb\\.go$" # Skip generated protobuf files exclude-rules: # Exclude some linters from running on tests files - path: _test\.go @@ -133,8 +130,8 @@ issues: new: false output: - format: colored-line-number + formats: + - format: colored-line-number print-issued-lines: true print-linter-name: true - uniq-by-line: true sort-results: true From 73c7238445790fdbd182eac97718914c5f7fc218 Mon Sep 17 00:00:00 2001 From: Dan Revie Date: Fri, 10 Apr 2026 11:27:49 -0400 Subject: [PATCH 3/4] fix(ci): only lint new issues to avoid blocking on pre-existing code The linter was previously broken (Go version mismatch), so existing code was never linted. Adding only-new-issues prevents pre-existing lint violations from blocking new PRs while they get cleaned up separately. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b6c21f6..1b7dd34 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,7 @@ jobs: uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2 with: version: v1.64.8 + only-new-issues: true - name: Check formatting run: | From dab2b8e9e3f32202347b0d7c349658e327d34a79 Mon Sep 17 00:00:00 2001 From: Dan Revie Date: Fri, 10 Apr 2026 11:32:38 -0400 Subject: [PATCH 4/4] fix(ci): format pre-existing Go files and gitignore CLAUDE.md Runs gofmt/goimports on files that were never formatted because CI was broken. Adds CLAUDE.md to gitignore to prevent accidental commits. No logic changes. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitignore | 1 + pkg/eol/aws/eks_endoflife_test.go | 6 +++--- pkg/eol/endoflife/client.go | 14 +++++++------- pkg/eol/endoflife/integration_test.go | 1 + pkg/eol/endoflife/provider.go | 24 ++++++++++++------------ pkg/inventory/wiz/client.go | 1 - 6 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 1c04b0e..d413a25 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ scratch/ # Claude Code .claude/ +**/CLAUDE.md diff --git a/pkg/eol/aws/eks_endoflife_test.go b/pkg/eol/aws/eks_endoflife_test.go index f5d24ca..36bfeb2 100644 --- a/pkg/eol/aws/eks_endoflife_test.go +++ b/pkg/eol/aws/eks_endoflife_test.go @@ -166,9 +166,9 @@ func TestEKSEOLProvider_WithEndOfLifeClient(t *testing.T) { return []*endoflife.ProductCycle{ { Cycle: "1.35", - ReleaseDate: "2025-11-20", // Different from static - EOL: "2027-12-20", // End of standard support - ExtendedSupport: "2029-05-20", // End of extended support + ReleaseDate: "2025-11-20", // Different from static + EOL: "2027-12-20", // End of standard support + ExtendedSupport: "2029-05-20", // End of extended support }, }, nil }, diff --git a/pkg/eol/endoflife/client.go b/pkg/eol/endoflife/client.go index 1a74f26..91d412d 100644 --- a/pkg/eol/endoflife/client.go +++ b/pkg/eol/endoflife/client.go @@ -29,13 +29,13 @@ type Client interface { // ProductCycle represents a single version/cycle from endoflife.date API // API docs: https://endoflife.date/docs/api/ type ProductCycle struct { - Cycle string `json:"cycle"` // Version identifier (e.g., "1.31") - ReleaseDate string `json:"releaseDate"` // Release date (YYYY-MM-DD) - Support string `json:"support"` // End of standard support (YYYY-MM-DD or boolean) - EOL string `json:"eol"` // End of life date (YYYY-MM-DD or boolean) - ExtendedSupport any `json:"extendedSupport"` // Extended support availability (boolean or date) - LTS bool `json:"lts"` // Long-term support flag - Latest string `json:"latest"` // Latest patch version + Cycle string `json:"cycle"` // Version identifier (e.g., "1.31") + ReleaseDate string `json:"releaseDate"` // Release date (YYYY-MM-DD) + Support string `json:"support"` // End of standard support (YYYY-MM-DD or boolean) + EOL string `json:"eol"` // End of life date (YYYY-MM-DD or boolean) + ExtendedSupport any `json:"extendedSupport"` // Extended support availability (boolean or date) + LTS bool `json:"lts"` // Long-term support flag + Latest string `json:"latest"` // Latest patch version LatestReleaseDate string `json:"latestReleaseDate"` // Latest patch release date } diff --git a/pkg/eol/endoflife/integration_test.go b/pkg/eol/endoflife/integration_test.go index 98764d4..b261b3d 100644 --- a/pkg/eol/endoflife/integration_test.go +++ b/pkg/eol/endoflife/integration_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration package endoflife diff --git a/pkg/eol/endoflife/provider.go b/pkg/eol/endoflife/provider.go index 36dce78..770580b 100644 --- a/pkg/eol/endoflife/provider.go +++ b/pkg/eol/endoflife/provider.go @@ -15,18 +15,18 @@ import ( // ProductMapping maps internal engine names to endoflife.date product identifiers var ProductMapping = map[string]string{ - "kubernetes": "amazon-eks", - "k8s": "amazon-eks", - "eks": "amazon-eks", - "postgres": "amazon-rds-postgresql", - "postgresql": "amazon-rds-postgresql", - "mysql": "amazon-rds-mysql", - "aurora-mysql": "amazon-rds-mysql", - "aurora-postgresql": "amazon-rds-postgresql", - "redis": "amazon-elasticache-redis", - "elasticache-redis": "amazon-elasticache-redis", - "valkey": "valkey", - "elasticache-valkey": "valkey", + "kubernetes": "amazon-eks", + "k8s": "amazon-eks", + "eks": "amazon-eks", + "postgres": "amazon-rds-postgresql", + "postgresql": "amazon-rds-postgresql", + "mysql": "amazon-rds-mysql", + "aurora-mysql": "amazon-rds-mysql", + "aurora-postgresql": "amazon-rds-postgresql", + "redis": "amazon-elasticache-redis", + "elasticache-redis": "amazon-elasticache-redis", + "valkey": "valkey", + "elasticache-valkey": "valkey", } // Provider fetches EOL data from endoflife.date API diff --git a/pkg/inventory/wiz/client.go b/pkg/inventory/wiz/client.go index 9a1179d..b438178 100644 --- a/pkg/inventory/wiz/client.go +++ b/pkg/inventory/wiz/client.go @@ -222,4 +222,3 @@ func parseTagObject(tagObj string) (key, value string) { return key, value } -