Skip to content

Update .golangci.yaml to v2 format#365

Merged
schmidtw merged 1 commit intomainfrom
update-golangci-v2
Apr 4, 2026
Merged

Update .golangci.yaml to v2 format#365
schmidtw merged 1 commit intomainfrom
update-golangci-v2

Conversation

@schmidtw
Copy link
Copy Markdown
Member

@schmidtw schmidtw commented Apr 4, 2026

Summary

This PR updates the .golangci.yaml configuration file to the golangci-lint v2 format.

Changes

Format Updates

  • Added version: "2" - Explicitly declares v2 configuration format
  • Restructured linter settings - Moved linters-settings to linters.settings
  • Updated issues section - Changed to v2 format with max-issues-per-linter and max-same-issues
  • Removed deprecated fields - Removed exclude-rules as v2 uses a different exclusion mechanism

Configuration Maintained

All linters remain the same:

  • Enabled: dupl, errorlint, goconst, gosec, misspell, unconvert, prealloc
  • Disabled: errcheck, ineffassign
  • Settings: misspell locale and errorlint errorf configuration preserved

Verification

Validated with:

golangci-lint config verify

No errors reported - configuration is valid for golangci-lint v2.11.3

Note

The v2 format doesn't support path-based exclusion rules in the same format as v1. The previous exclude-rules for test files (_test.go) has been removed. If test file exclusions are still needed, they should be configured using v2's exclusion mechanism (which may require linter-specific settings).

- Add version: "2" field
- Update linters section structure (enable/disable stay the same)
- Move linter settings under linters.settings
- Update issues section to v2 format (max-issues-per-linter, max-same-issues)
- Remove deprecated exclude-rules (v2 doesn't support path-based exclusions in same format)
- Verify config with: golangci-lint config verify
@schmidtw schmidtw added the normalize Repo normalization work label Apr 4, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.78%. Comparing base (d7733ed) to head (6e41e6e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #365   +/-   ##
=======================================
  Coverage   99.78%   99.78%           
=======================================
  Files          30       30           
  Lines         924      924           
=======================================
  Hits          922      922           
  Misses          2        2           
Flag Coverage Δ
unittests 99.78% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@schmidtw schmidtw merged commit 9c20e8b into main Apr 4, 2026
19 checks passed
@schmidtw schmidtw deleted the update-golangci-v2 branch April 4, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

normalize Repo normalization work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants