chore: bump golangci-lint to v2.12.2#5564
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5564 +/- ##
=======================================
Coverage 50.35% 50.35%
=======================================
Files 338 338
Lines 78574 78574
=======================================
Hits 39568 39568
Misses 37506 37506
Partials 1500 1500 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s linting setup to use golangci-lint v2.12.2 and applies code changes needed to satisfy newer lint/tooling expectations (notably around reflection pointer handling and reverse-iteration helpers).
Changes:
- Bump
golangci-lintGitHub Action configuration tov2.12.2. - Update reflection pointer-kind checks across the codebase (
reflect.Ptr→reflect.Pointer). - Replace manual reverse loops with
slices.Backward(...)in argument/type traversal.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/gofields/gofields.go | Updates pointer-kind handling in reflection helpers. |
| internal/args/unmarshal.go | Adds slices usage and updates pointer-kind checks during unmarshalling. |
| internal/args/marshal.go | Updates pointer-kind checks during marshalling. |
| internal/args/args.go | Uses slices.Backward and updates pointer-kind checks for arg type traversal. |
| core/reflect.go | Updates pointer-kind checks in reflection utilities. |
| core/human/utils.go | Updates nil-interface detection to use the new pointer kind constant. |
| core/human/marshal.go | Updates pointer-kind checks across human marshaling paths. |
| core/human/marshal_func.go | Updates marshalability checks for pointer types. |
| core/autocomplete_utils.go | Updates pointer-kind checks when traversing autocomplete resources. |
| .golangci.yml | Adjusts enabled linters for the new golangci-lint version (incl. gomodguard linter name change). |
| .github/workflows/lint.yml | Bumps the golangci-lint version used in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| with: | ||
| # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
| version: v2.9.0 | ||
| version: v2.12.2 |
| - funcorder # Checks the order of functions, methods, and constructors. [fast] | ||
| - gocheckcompilerdirectives # Checks that go compiler directive comments (//go:) are valid. [fast: true, auto-fix: false] | ||
| - gochecksumtype # Run exhaustiveness checks on Go "sum types" [fast: false, auto-fix: false] | ||
| - goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false] | ||
| - gocritic # Provides diagnostics that check for bugs, performance and style issues. [fast: false, auto-fix: false] | ||
| - gocyclo # Computes and checks the cyclomatic complexity of functions [fast: true, auto-fix: false] | ||
| - goheader # Checks is file header matches to pattern [fast: true, auto-fix: false] | ||
| - gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod. [fast: true, auto-fix: false] | ||
| - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations. [fast: true, auto-fix: false] | ||
| - gomodguard_v2 # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations. [fast: true, auto-fix: false] | ||
| - goprintffuncname # Checks that printf-like functions are named with `f` at the end [fast: true, auto-fix: false] |
Community Note
Relates OR Closes #0000
Release note for CHANGELOG: