Skip to content

chore: bump golangci-lint to v2.12.2#5564

Merged
remyleone merged 1 commit into
mainfrom
bump_golangci_lint
May 12, 2026
Merged

chore: bump golangci-lint to v2.12.2#5564
remyleone merged 1 commit into
mainfrom
bump_golangci_lint

Conversation

@remyleone

Copy link
Copy Markdown
Member

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Release note for CHANGELOG:


Copilot AI review requested due to automatic review settings May 12, 2026 15:00
@remyleone remyleone enabled auto-merge May 12, 2026 15:04
@remyleone remyleone added this pull request to the merge queue May 12, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.75862% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.35%. Comparing base (30e4055) to head (c88a8bf).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
internal/args/args.go 60.00% 2 Missing ⚠️
core/human/marshal.go 80.00% 1 Missing ⚠️
core/reflect.go 50.00% 1 Missing ⚠️
internal/args/unmarshal.go 83.33% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Merged via the queue into main with commit f9bd4a4 May 12, 2026
125 checks passed
@remyleone remyleone deleted the bump_golangci_lint branch May 12, 2026 15:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-lint GitHub Action configuration to v2.12.2.
  • Update reflection pointer-kind checks across the codebase (reflect.Ptrreflect.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
Comment thread .golangci.yml
Comment on lines 38 to 46
- 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]
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.

4 participants