Skip to content
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

🌱 Bump golangci-lint to v1.55.1 #9622

Merged

Conversation

adityabhatia
Copy link
Contributor

@adityabhatia adityabhatia commented Oct 26, 2023

What this PR does / why we need it:
This PR bumps the golangci-lint from v1.54.1 -> v1.55.1

The major changes proposed in this PR include version updates to the following linters:
gosec - G601: Implicit memory aliasing in for loop.
goconst - string xyz has X occurrences, make it a constant

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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label labels Oct 26, 2023
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 26, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @adityabhatia. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 26, 2023
@adityabhatia
Copy link
Contributor Author

adityabhatia commented Oct 26, 2023

For the goconst linter, tests had to be excluded, since the number of re-used occurrences of strings > 3 resulted in a relatively large amount of lint issues. These can be fixed, however I believe these strings enhance the readability of the individual test cases.
E.g. https://github.com/kubernetes-sigs/cluster-api/blob/main/bootstrap/kubeadm/types/utils_test.go#L260

@killianmuldoon
Copy link
Contributor

For the goconst linter, tests had to be excluded, since the number of re-used occurrences of strings > 3 resulted in a relatively large amount of lint issues. These can be fixed, however I believe these strings enhance the readability of the individual test cases.

Could you open up a follow-up issue to decide how to handle this going forward. It's good to have as a nudge IMO, and we could set it to 5 or 8 or something to make it less impactful. But let's take it to a new issue and continue with this one as-is.

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

/area dependency

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. area/dependency Issues or PRs related to dependency changes and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. do-not-merge/needs-area PR is missing an area label labels Oct 26, 2023
@adityabhatia
Copy link
Contributor Author

For the goconst linter, tests had to be excluded, since the number of re-used occurrences of strings > 3 resulted in a relatively large amount of lint issues. These can be fixed, however I believe these strings enhance the readability of the individual test cases.

Could you open up a follow-up issue to decide how to handle this going forward. It's good to have as a nudge IMO, and we could set it to 5 or 8 or something to make it less impactful. But let's take it to a new issue and continue with this one as-is.

Sure - I wanted to check what other had to say, before formulating this issue.

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 1, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 2499ed767b3473566f2b15d3facd1eacb4a6a575

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

One nit and this is good to go - thanks!

controlplane/kubeadm/internal/controllers/helpers_test.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 6, 2023
Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

Thanks!

/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 Nov 7, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 44a4db009d6036a5d92867ebef25126a64b45afd

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: killianmuldoon

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 Nov 7, 2023
@k8s-ci-robot k8s-ci-robot merged commit 76ab740 into kubernetes-sigs:main Nov 7, 2023
20 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.6 milestone Nov 7, 2023
@adityabhatia adityabhatia deleted the bump-golangci-lint-1.55.1 branch November 20, 2023 21:52
@adityabhatia adityabhatia restored the bump-golangci-lint-1.55.1 branch November 20, 2023 21:52
@adityabhatia adityabhatia deleted the bump-golangci-lint-1.55.1 branch November 20, 2023 21:52
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/dependency Issues or PRs related to dependency changes 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

4 participants