Skip to content

chore: upgrade golangci-lint to v2.7.2#373

Merged
dejanzele merged 1 commit intomainfrom
chore/upgrade-golangci-lint-v2
Mar 17, 2026
Merged

chore: upgrade golangci-lint to v2.7.2#373
dejanzele merged 1 commit intomainfrom
chore/upgrade-golangci-lint-v2

Conversation

@dejanzele
Copy link
Copy Markdown
Member

@dejanzele dejanzele commented Dec 26, 2025

Pull Request Template

What type of PR is this?

Maintenance / Dependency Update

What this PR does / why we need it:

Upgrades golangci-lint from v1.64.6 to v2.7.2 and migrates the configuration to the v2 format.

Changes

  • Updated golangci-lint version to v2.7.2
  • Updated module path to github.com/golangci/golangci-lint/v2/cmd/golangci-lint
  • Updated CI lint action to use golangci-lint version v2.7.2
  • Migrated .golangci.yml to v2 format:
  • Disabled new staticcheck checks that weren't previously enabled:
    • QF1008 (embedded field selector simplification)
    • ST1019 (duplicate imports)

References

@dejanzele dejanzele force-pushed the chore/upgrade-golangci-lint-v2 branch 2 times, most recently from eb98d90 to 788c74b Compare December 26, 2025 13:48
Copy link
Copy Markdown
Member

@richscott richscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice update - I am seeing lots of projects moving to v2. I had just one question/suggestion about some enabled check codes.

Comment thread .golangci.yml Outdated
staticcheck:
checks:
- "all"
- "-QF1008"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about adding a short trailing comment for what each of these check codes mean? I researched a bit, and it looks like they mean:

QF1008 Omit embedded fields from selector expression
ST1003 Poorly chosen identifier
ST1019 Importing the same package multiple times

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love that idea!

@dejanzele dejanzele force-pushed the chore/upgrade-golangci-lint-v2 branch from 788c74b to cbb9055 Compare March 17, 2026 15:24
@dejanzele dejanzele merged commit 015d952 into main Mar 17, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants