fix: upgrade golangci-lint to v2 and modernize configuration #487
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
Background
This project hasn't been updated for a while and was using an outdated golangci-lint v1 configuration that was incompatible with modern tooling. The CI/CD pipeline was failing due to configuration incompatibilities. This PR modernizes the linting infrastructure while temporarily relaxing rules to allow gradual code quality improvements.
Changes Made
.golangci.ymlfrom v1 to v2 formatgolangci-lint-action@v8withv2.2.0Temporarily Disabled Linters and Rules
To unblock development and allow gradual improvements, the following checks have been temporarily suppressed:
Disabled Linters
exhaustruct- Struct field completeness (too strict)wrapcheck- Error wrapping check (project specific)testpackage- Test package separation (not conventional)paralleltest- Parallel test check (not always needed)nlreturn- Newline before return (too strict)wsl- Whitespace rules (too strict)gochecknoglobals- No global variables (sometimes needed)gochecknoinits- No init functions (sometimes needed)exhaustive- Enum completeness (too strict initially)unused- Temporarily disabled for gradual cleanupExcluded Error Patterns
File-Specific Exclusions
.pb.gofilesNext Steps
Test Plan