Skip to content

fix(lint): resolve golangci-lint v2.11.4 errors#1338

Open
IfSentient wants to merge 1 commit intomainfrom
IfSentient/fix-golangci-lint-2-11-4
Open

fix(lint): resolve golangci-lint v2.11.4 errors#1338
IfSentient wants to merge 1 commit intomainfrom
IfSentient/fix-golangci-lint-2-11-4

Conversation

@IfSentient
Copy link
Copy Markdown
Contributor

@IfSentient IfSentient commented Apr 9, 2026

What Changed? Why?

Follow-up to #1337, reverts the linter back to 2.11.4, but also bumps the action's linter version to 2.11.4 to ensure that PR linter checks match the local make lint.

Upgrades golangci-lint from v2.5.0 to v2.11.4 in the Makefile and CI workflow, and fixes all new linter errors introduced by the upgrade across 26 files.

The new linter version introduced stricter checks for: deprecatedComment (Deprecated notices must be in a separate paragraph), gosec (G115/G118/G122), prealloc (slice capacity hints), revive (use-slices-sort — replace sort.Slice/sort.Strings with slices.SortFunc/slices.Sort), and staticcheck (QF1012 — prefer fmt.Fprintf over WriteString(fmt.Sprintf(...))).

How was it tested?

make lint reports 0 issues. make test passes for all packages.

Where did you document your changes?

No documentation changes required; all changes are code/comment fixes to satisfy the linter.

Notes to Reviewers

Most changes are mechanical: blank lines before // Deprecated: comments, //nolint: directives where fixes would be counterproductive (e.g. calling a function twice just to preallocate), and replacing sort package calls with slices equivalents.

Fixes deprecatedComment, gosec, prealloc, revive (use-slices-sort), and
staticcheck issues introduced by the upgrade from golangci-lint v2.5.0 to
v2.11.4. Updates linter version in Makefile and CI workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@IfSentient IfSentient requested a review from a team as a code owner April 9, 2026 15:03
@IfSentient IfSentient requested review from konsalex and spinillos April 9, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant