-
Notifications
You must be signed in to change notification settings - Fork 203
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
Fix warnings in golangci linter #1085
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: joeyyy09 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @joeyyy09. 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 Once the patch is verified, the new status will be reflected by the 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-sigs/prow repository. |
✅ Deploy Preview for k8s-kwok canceled.
|
/ok-to-test |
.golangci.yaml
Outdated
- staticcheck | ||
- stylecheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why turn off the check, it works fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i didnt turn off the check, static check and style check are deprecated and it's covered under the global run.go in the later versions so they're performing the actions under the global run.go as per the docs i've see., PFA the image where the warnings and the logs are shown. I've made the changes according to the logs itself. Let me know if i've got to change this
.github/workflows/golangci-lint.yaml
Outdated
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.55.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All checks are version dependent, the current version of lint has no warnings in CI, you should upgrade this version and fix the warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All checks are version dependent, the current version of lint has no warnings in CI, you should upgrade this version and fix the warnings.
Okay, will look into this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've bumped up the version to 1.58 as per your suggestion in the new commit
.github/workflows/golangci-lint.yaml
Outdated
@@ -17,4 +17,4 @@ jobs: | |||
uses: golangci/golangci-lint-action@v3 | |||
with: | |||
version: v1.55.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version: v1.55.2 | |
version: v1.58.2 |
And also bump following
https://github.com/kubernetes-sigs/kwok/blob/main/hack/update-go-lint.sh
https://github.com/kubernetes-sigs/kwok/blob/main/hack/verify-go-lint.sh
@wzshiming I've fixed all the warnings and errors. Can you please have a look at them? |
Still, pull-kwok-verify-main — Job failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squash commits and rebase to main
Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in> Bump golangci version to the latest version Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in> Bump golangci version to the latest version Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in> Bump golangci version to the latest version Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in> Change golangci-lint version to v1.55.2 Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in>
* Add Test Cases for slices package Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in> * Fix linting issues Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in> * Fix linting issues Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in> --------- Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in>
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 6. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@v3...v6) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in> Made faulty reader a field to be more generic Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in>
Fix warnings in golangci linter Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in> Update .golangci.yaml Co-authored-by: Shiming Zhang <wzshiming@hotmail.com> Fix issues Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in>
PR needs rebase. 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. |
@joeyyy09: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR updates the
.golangci.yaml
file to address the following warnings:linters.staticcheck.go
andlinters.stylecheck.go
are replaced with globalrun.go
.run.skip-files
toissues.exclude-files
.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?