Skip to content

[plan] Upgrade golangci-lint from v1.62.2 to v2.7.2 #7375

@github-actions

Description

@github-actions

Overview

This tracking issue covers the upgrade of golangci-lint from v1.62.2 to v2.7.2, closing an 8-month version gap and unlocking 100+ new features, bug fixes, and performance improvements.

Source: Discussion #7356 - Go Module Review: golangci-lint

Why This Upgrade Matters

  • Go 1.25 support (added in v2.4.0)
  • 100+ improvements across bug fixes, features, and new linters
  • Performance enhancements in v2 release line
  • New linters including modernize, godoclint, and security improvements
  • Automated migration via golangci-lint migrate command

Planned Tasks

This upgrade is broken down into focused, sequential tasks:

  1. Upgrade golangci-lint dependency - Update go.mod and tools.go to v2.7.2
  2. Run automated migration - Use golangci-lint migrate to convert configuration
  3. Validate CI integration - Ensure CI pipeline works with v2
  4. Enable new linters - Add modernize, gocritic, and other valuable linters
  5. Optimize CI performance - Add incremental linting for faster runs

Migration Strategy

The v2 upgrade includes breaking changes, but the golangci-lint team provides an automated migration tool that handles most of the conversion automatically. Each task builds on the previous one to ensure a safe, incremental upgrade path.

Expected Benefits

  • Modern Go 1.25 compatibility
  • Access to 8 months of improvements
  • Better code quality through new linters
  • Faster CI runs through optimization
  • Cleaner configuration format

Related: #7356

AI generated by Plan Command for discussion #7356

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions