Skip to content

🌱 Bump golangci-lint to v1.62.2 and fix all lint errors #5255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

AndiDog
Copy link
Contributor

@AndiDog AndiDog commented Dec 17, 2024

What type of PR is this?

/kind support
/area testing

What this PR does / why we need it:

This updates lots of linters. The new version also gives more consistency between local make lint and our GitHub action. For me, the local execution with the old version gave some panics and different results.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Special notes for your reviewer:

Checklist:

  • squashed commits
  • includes documentation
  • includes emojis
  • adds unit tests
  • adds or updates e2e tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/support Categorizes issue or PR as a support question. area/testing Issues or PRs related to testing labels Dec 17, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 17, 2024
@Ankitasw
Copy link
Member

Ankitasw commented Jan 3, 2025

/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 Jan 3, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Ankitasw

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

The pull request process is described here

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 Jan 3, 2025
@k8s-ci-robot k8s-ci-robot merged commit 824e59c into kubernetes-sigs:main Jan 3, 2025
24 checks passed
r4f4 added a commit to r4f4/cluster-api-provider-aws that referenced this pull request Mar 7, 2025
This fixes the issue of shadowing the builtins `min`/`max` shadowed by
local variables declaration.

This has been fixed in newer branches via kubernetes-sigs#5255
@r4f4
Copy link
Contributor

r4f4 commented Mar 7, 2025

/cherry-pick release-2.6

@k8s-infra-cherrypick-robot

@r4f4: only kubernetes-sigs org members may request cherry picks. If you are already part of the org, make sure to change your membership to public. Otherwise you can still do the cherry-pick manually.

In response to this:

/cherry-pick release-2.6

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@damdo
Copy link
Member

damdo commented Mar 7, 2025

/cherry-pick release-2.6

@k8s-infra-cherrypick-robot

@damdo: #5255 failed to apply on top of branch "release-2.6":

Applying: Bump golangci-lint to v1.62.2 and fix all lint errors
Using index info to reconstruct a base tree...
M	.github/workflows/pr-golangci-lint.yaml
M	.golangci.yml
M	bootstrap/eks/controllers/eksconfig_controller.go
M	cmd/clusterawsadm/ami/helper.go
M	controllers/awscluster_controller.go
M	controllers/awsmachine_controller.go
M	controlplane/eks/controllers/awsmanagedcontrolplane_controller.go
M	controlplane/rosa/controllers/rosacontrolplane_controller.go
M	exp/api/v1beta2/awsmachinepool_types.go
M	exp/controllers/rosamachinepool_controller.go
M	pkg/cloud/services/autoscaling/autoscalinggroup.go
M	pkg/cloud/services/ec2/launchtemplate.go
M	pkg/cloud/services/elb/loadbalancer.go
M	pkg/cloud/services/elb/loadbalancer_test.go
M	pkg/cloud/services/network/natgateways.go
M	pkg/cloud/services/network/network.go
M	pkg/cloud/services/network/secondarycidr.go
M	pkg/cloud/services/securitygroup/securitygroups.go
M	pkg/cloud/tags/tags.go
M	test/e2e/shared/aws.go
M	test/e2e/suites/unmanaged/helpers_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/e2e/suites/unmanaged/helpers_test.go
Auto-merging test/e2e/shared/aws.go
Auto-merging pkg/cloud/tags/tags.go
CONFLICT (content): Merge conflict in pkg/cloud/tags/tags.go
Auto-merging pkg/cloud/services/securitygroup/securitygroups.go
Auto-merging pkg/cloud/services/network/secondarycidr.go
CONFLICT (content): Merge conflict in pkg/cloud/services/network/secondarycidr.go
Auto-merging pkg/cloud/services/network/network.go
CONFLICT (content): Merge conflict in pkg/cloud/services/network/network.go
Auto-merging pkg/cloud/services/network/natgateways.go
Auto-merging pkg/cloud/services/elb/loadbalancer_test.go
Auto-merging pkg/cloud/services/elb/loadbalancer.go
Auto-merging pkg/cloud/services/ec2/launchtemplate.go
Auto-merging pkg/cloud/services/autoscaling/autoscalinggroup.go
Auto-merging exp/controllers/rosamachinepool_controller.go
Auto-merging exp/api/v1beta2/awsmachinepool_types.go
Auto-merging controlplane/rosa/controllers/rosacontrolplane_controller.go
CONFLICT (content): Merge conflict in controlplane/rosa/controllers/rosacontrolplane_controller.go
Auto-merging controlplane/eks/controllers/awsmanagedcontrolplane_controller.go
Auto-merging controllers/awsmachine_controller.go
Auto-merging controllers/awscluster_controller.go
Auto-merging cmd/clusterawsadm/ami/helper.go
Auto-merging bootstrap/eks/controllers/eksconfig_controller.go
Auto-merging .golangci.yml
Auto-merging .github/workflows/pr-golangci-lint.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Bump golangci-lint to v1.62.2 and fix all lint errors

In response to this:

/cherry-pick release-2.6

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@damdo
Copy link
Member

damdo commented Mar 7, 2025

@r4f4 it'll need to be dealt with manually it sounds like

@r4f4
Copy link
Contributor

r4f4 commented Mar 7, 2025

@damdo fair enough, I'll do over at #5377

r4f4 added a commit to r4f4/cluster-api-provider-aws that referenced this pull request Mar 7, 2025
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. area/testing Issues or PRs related to testing cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/support Categorizes issue or PR as a support question. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants