Skip to content

Enable golangci-lint modernize linter - #4821

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
erikgb:modernize-linter
May 11, 2026
Merged

k8s-ci-robot merged 1 commit into
kubernetes-sigs:mainfrom
erikgb:modernize-linter

Conversation

@erikgb

@erikgb erikgb commented May 2, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

As Go evolves, we should try to keep up with new features. In recent versions of golangci-lint, there is a new linter that can help us with this: modernize! We have enabled it across all our projects, and I propose enabling it here as well. Most of the changes were auto-fixed by golangci-lint by running golangci-lint run --fix across the Go modules. Which means they should be rather safe.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels May 2, 2026
@k8s-ci-robot
k8s-ci-robot requested review from davidjumani and rikatz May 2, 2026 15:15
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 2, 2026
@erikgb
erikgb force-pushed the modernize-linter branch 2 times, most recently from 38e9b8d to f157854 Compare May 2, 2026 15:34
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 2, 2026
@erikgb
erikgb force-pushed the modernize-linter branch from f157854 to 004a163 Compare May 4, 2026 06:06
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 4, 2026
Signed-off-by: Erik Godding Boye <egboye@gmail.com>
@erikgb
erikgb force-pushed the modernize-linter branch from 004a163 to ba8a079 Compare May 4, 2026 17:49
@rikatz

rikatz commented May 11, 2026

Copy link
Copy Markdown
Member

This is great, thanks @erikgb

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 11, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: erikgb, rikatz

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 11, 2026
@k8s-ci-robot
k8s-ci-robot merged commit 85132ed into kubernetes-sigs:main May 11, 2026
20 checks passed
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants