Overview
When using golangci-lint
with Go 1.23, developers have reported excessive memory usage, causing system slowdowns or crashes. This issue arises from a version mismatch between golangci-lint
and Go.
Cause
golangci-lint
version 1.59.1, built with Go 1.22.4, struggles with Go 1.23’s features, leading to high memory consumption.
Solution
- Upgrade: Use
golangci-lint
1.60.0+ for compatibility with Go 1.23. - Check Versions: Ensure
golangci-lint
is built with the same Go version as your project. - Use Official Binaries: Prefer official binaries over package manager versions to avoid outdated builds.
Conclusion
Keeping golangci-lint
and Go versions aligned prevents memory issues. Regular updates and using official releases ensure a stable development environment. For more details, see the discussion in this GitHub issue.