Skip to content

馃尡 Upgrade golangci-lint to v2.14.0 and enable promlinter, reassign linters - #1488

Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes-sigs:mainfrom
dongjiang1989:up-golangci-linter
Oct 14, 2026
Merged

kubernetes-prow[bot] merged 1 commit into
kubernetes-sigs:mainfrom
dongjiang1989:up-golangci-linter

Conversation

@dongjiang1989

@dongjiang1989 dongjiang1989 commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

What does this do?

ref: kubernetes-sigs/controller-runtime#3619

  • Upgrade golangci-lint from v2.13.1 to v2.14.0
  • Enable two new linters: promlinter (Prometheus metrics naming) and reassign (package variable reassignment checks)
  • Fix existing go vet warnings by renaming WriteTo to Write in the Span interface to avoid conflict with io.WriterTo standard library interface

Why do we need it?

Keeping the linter version up-to-date ensures we benefit from the latest improvements and bug fixes. The new linters help maintain code quality by catching potential issues early.

- Update golangci-lint version from v2.13.1 to v2.14.0 in GitHub workflow
- Enable promlinter linter for Prometheus metrics naming checks
- Enable reassign linter for package variable reassignment checks
- Fix go vet warnings by renaming WriteTo to Write in Span interface
  to avoid conflict with io.WriterTo standard library interface

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 14, 2026
@sbueringer

Copy link
Copy Markdown
Member

Thx!

/lgtm
/approve

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 14, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 582e5f9beeb023d2fa141187e47f30767f584af5

@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dongjiang1989, sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 14, 2026
@kubernetes-prow
kubernetes-prow Bot merged commit def1e80 into kubernetes-sigs:main Oct 14, 2026
12 checks passed
@dongjiang1989
dongjiang1989 deleted the up-golangci-linter branch October 14, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants