chore: bump Go and modernize golangci-lint setup#12
Conversation
📝 WalkthroughWalkthroughThe changes upgrade Go toolchain version from 1.22 to 1.24.0 with toolchain specification for 1.26.0, update golangci-lint GitHub Action from v6 to v9, and migrate linting configuration to v2-style layout with reorganized linters and formatters. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.golangci.yml:
- Line 52: Remove the stale/self-referential comment next to the "gofumpt" entry
in .golangci.yml (the comment "# Use gofumpt instead.") so the linter list is
not misleading; locate the "gofumpt" line and delete the trailing comment,
leaving only the linter name.
🧹 Nitpick comments (1)
.golangci.yml (1)
32-48: Path exclusions are duplicated betweenlinters.exclusionsandformatters.exclusions.This is expected in golangci-lint v2 since linters and formatters have independent exclusion configs, but worth noting that any future path-exclusion changes need to be updated in both places.
Also applies to: 54-61
| formatters: | ||
| enable: | ||
| - gci | ||
| - gofumpt # Use gofumpt instead. |
There was a problem hiding this comment.
Stale comment on gofumpt — it already is gofumpt.
The comment # Use gofumpt instead. appears to be a leftover from the v1 config where it likely annotated the gofmt linter. Here it's on the gofumpt entry itself, so the comment is self-referential and misleading.
Proposed fix
- - gofumpt # Use gofumpt instead.
+ - gofumpt📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - gofumpt # Use gofumpt instead. | |
| - gofumpt |
🤖 Prompt for AI Agents
In @.golangci.yml at line 52, Remove the stale/self-referential comment next to
the "gofumpt" entry in .golangci.yml (the comment "# Use gofumpt instead.") so
the linter list is not misleading; locate the "gofumpt" line and delete the
trailing comment, leaving only the linter name.
Summary
Verification
Summary by CodeRabbit