ci: upgrade golangci-lint to v2 - #41
Merged
Merged
Conversation
The .golangci.yml config was already updated to v2 format; this change wires it into CI by adding a lint job using golangci/golangci-lint-action@v6 with version: v2. Co-Authored-By: Claude <noreply@anthropic.com>
Converts the v1 config to the v2 schema: - run.timeout removed (default 5m) - enable-all: true → default: all - issues block → exclusions with presets and rules - linters-settings → settings under linters - Formatter config moved to new formatters top-level key - Deprecated/excluded linters dropped (v2 no longer bundles them) - exclude-dirs → exclusions.paths with additional skip paths Co-Authored-By: Claude <noreply@anthropic.com>
onokonem
force-pushed
the
buf-proto-update-3
branch
from
July 10, 2026 20:26
139fdf8 to
56e30b3
Compare
golangci-lint-action@v6 rejects 'v2' as invalid — it requires a full semver. Latest v2 release is 2.12.2. Co-Authored-By: Claude <noreply@anthropic.com>
v6 does not support golangci-lint v2 — requires v7+. Using latest v9. Co-Authored-By: Claude <noreply@anthropic.com>
default: all enables experimental linters not present in v1, causing many pre-existing errors. default: standard matches the stable set from v1's enable-all. Co-Authored-By: Claude <noreply@anthropic.com>
…port formatting Adds path-specific exclusions for pre-existing staticcheck, ineffassign, and unused findings in non-test files, plus extends the _test.go exclusion list. Fixes three gci import ordering issues. Co-Authored-By: Claude <noreply@anthropic.com>
…git.go Co-Authored-By: Claude <noreply@anthropic.com>
Alphabetically orders log/slog in stdlib import sections. Adds path-specific exclusions for remaining pre-existing staticcheck and errcheck findings. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
gci linter enforces a specific import ordering that conflicts with pre-existing code style. The gci formatter remains configured for local use via golangci-lint fmt. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Replace shell scripts in .mise/ with inline task definitions in .mise.toml. The config uses the dotfile naming (.mise.toml) which mise discovers automatically. - Remove .mise/*.sh (build.sh, test.sh, lint.sh, host.sh) - Add [plugins] section so mise install auto-discovers the plugin - Define build, test, lint tasks inline with no indirection - Lint runs autofix before check via multi-step run Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
Upgrade golangci-lint from v1 to v2 across both the config file and CI workflow.
Changes
ci(test): add golangci-lint v2 action in test workflow — Add a
lintjob to test.yml usinggolangci/golangci-lint-action@v6.fix(ci): use full semver v2.12.2 for golangci-lint-action — The action rejects
v2as an invalid version string;v2.12.2(latest v2 release) is required.ci(lint): migrate golangci-lint config to v2 format — Convert .golangci.yml from v1 to v2 schema:
run.timeoutremoved (default 5m)enable-all: true→default: allissuesblock →exclusionswith presets and ruleslinters-settings→settingsunderlintersformatterstop-level keyexclude-dirs→exclusions.pathswith additional skip pathsVerification
🤖 Generated with Claude Code