Migrate golangci-lint to v2#177
Open
AntiD2ta wants to merge 1 commit into
Open
Conversation
golangci-lint v1.64.8 (bundled go1.24 type-checker) cannot type-check the go1.26 standard library that GitHub's runners now provide via setup-go '^1.22', producing "file requires newer Go version go1.26" errors that break the lint job on every PR since ~2026-06-26 (master passed on 06-23, before the runner image started serving go1.26.4). Bump golangci/golangci-lint-action to v7 (pinned golangci-lint v2.12.2, built against go1.26) and migrate .golangci.yml to the v2 schema via `golangci-lint migrate`, preserving the project's effective ruleset: - enable-all -> default: all; stylecheck merged into staticcheck (-ST1000 carried over); gofmt/gofumpt/goimports moved to the formatters section. - Drop gci (now a formatter) and tenv (removed in v2) from the disable list. - Disable wsl_v5 alongside wsl: v2 default:all enables both the deprecated alias and its replacement, so both must be off to keep wsl disabled. - Disable new-in-v2 linters that conflict with established idioms: noinlineerr (the codebase uses inline `if err := ...` throughout) and modernize. - Disable the deprecated gomodguard to silence its warning (consistent with depguard already being disabled). Validated locally with golangci-lint v2.12.2 under go1.26: `config verify` passes and a full run completes with no typecheck or deprecation warnings; the only remaining findings are pre-existing prealloc/staticcheck issues that only-new-issues filters on CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This unblocks the lint job for all open PRs.