CI: migrate to golangci-lint v2#6473
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6473 +/- ##
==========================================
- Coverage 46.37% 46.17% -0.21%
==========================================
Files 668 660 -8
Lines 112102 111965 -137
==========================================
- Hits 51989 51697 -292
- Misses 57368 57511 +143
- Partials 2745 2757 +12 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the project from golangci-lint v1 to v2 to support Go 1.25. The migration involves updating the linter configuration format, converting a custom plugin from v1's shared object to v2's module plugin interface, and updating CI workflows.
Key Changes:
- Upgraded golangci-lint from v1.64.8 to v2.5.0
- Migrated
.golangci.ymland.golangci-warnings.ymlto v2 configuration format - Converted partitiontest_linter from plugin to v2 module plugin architecture
Reviewed Changes
Copilot reviewed 39 out of 41 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/buildtools/versions | Updated golangci-lint version and import path |
| scripts/buildtools/install_buildtools.sh | Updated golangci-lint module path |
| .golangci.yml | Migrated linter configuration to v2 format |
| .golangci-warnings.yml | Migrated warnings configuration to v2 format |
| .custom-gcl.yml | Added v2 custom plugin configuration |
| .github/workflows/reviewdog.yml | Updated CI workflow for v2 and simplified linter build process |
| cmd/partitiontest_linter/linter.go | Added v2 module plugin registration |
| cmd/partitiontest_linter/plugin/plugin.go | Removed obsolete v1 plugin code |
| cmd/partitiontest_linter/go.mod | Updated dependencies for v2 plugin system |
| Makefile | Updated linter build commands for v2 |
| Multiple Go files | Applied linter auto-fixes (gosec nolints, code simplifications) |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary
Following the upgrade to Go 1.25 in #6468 we should also migrate to golangci-lint v2, which supports the new Go version in its binaries.
Test Plan
Existing tests should pass, updated reviewdog job to use the new version.