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

Fix some bugs reported by staticcheck #7663

Merged
merged 1 commit into from
Sep 25, 2019

Conversation

rifelpet
Copy link
Member

@rifelpet rifelpet commented Sep 24, 2019

I noticed these issues when running staticcheck:

nodeup/pkg/model/context.go:563:10: this value of err is never used (SA4006)
pkg/apis/kops/validation/gce.go:46:3: this value of allErrs is never used (SA4006)
protokube/cmd/protokube/main.go:216:12: this condition occurs multiple times in this if/else if chain (SA4014)

If we think its beneficial I'll see about integrating staticcheck into our CI process similar to how k/k did.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 24, 2019
@rifelpet rifelpet force-pushed the staticcheck-bugfixes branch from 069cb9e to c8d424d Compare September 25, 2019 13:35
@rifelpet
Copy link
Member Author

/test pull-kops-e2e-kubernetes-aws

@rdrgmnzs
Copy link
Contributor

This looks great! Thanks @rifelpet!
+1 on adding staticcheck to the CI pipeline.

/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 Sep 25, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rdrgmnzs, rifelpet

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 Sep 25, 2019
@k8s-ci-robot k8s-ci-robot merged commit ba69006 into kubernetes:master Sep 25, 2019
@mikesplain
Copy link
Contributor

Nice job, agreed, running staticcheck sounds great!

k8s-ci-robot added a commit that referenced this pull request Oct 1, 2019
…-origin-release-1.15

Automated cherry pick of #7663: Fix some staticcheck warnings
@rifelpet rifelpet deleted the staticcheck-bugfixes branch August 6, 2020 02:49
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants