Update golangci-lint to v2.15.0 and fix the linter config

Convert .golangci.yml to the v2 layout: linters-settings and
issues.exclude-use-default were rejected by the v2 schema, so the lll,
funlen, cyclop, and dupl settings were never applied. Disable
exhaustruct_v5 (the newer major version of the already-disabled
exhaustruct) and the deprecated gomodguard. Pin the golangci-lint image
at v2.15.0 in the Makefile and Dockerfile.
This commit is contained in:
2026-10-31 13:22:43 -07:00
parent ad1d51a9f9
commit 897dc9aced
4 changed files with 23 additions and 29 deletions
+2 -4
View File
@@ -12,10 +12,8 @@ VERSION := $(shell git describe --always --dirty 2>/dev/null || echo dev)
GOLDFLAGS := -X main.Version=$(VERSION)
GO_DIRS := cmd internal pkg
# golangci/golangci-lint:v2.12.2, 2026-05-06
# Pinned below v2.13.0 until the canonical .golangci.yml disables
# exhaustruct_v5 (see the TODO in README.md). Keep in sync with Dockerfile.
GOLANGCI_LINT_IMAGE := golangci/golangci-lint@sha256:5cceeef04e53efe1470638d4b4b4f5ceefd574955ab3941b2d9a68a8c9ad5240
# golangci/golangci-lint:v2.15.0, 2026-10-16 (keep in sync with Dockerfile)
GOLANGCI_LINT_IMAGE := golangci/golangci-lint@sha256:fbfcfd12a6f8d7f1b97b3362ca80fc2a244d46863148c73cb88e7793af96c481
# flags are repeated here (also in .prettierrc) so this Makefile works
# standalone when copied as a template