-
Notifications
You must be signed in to change notification settings - Fork 31
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
use golangci-lint as linter #170
Conversation
Welcome @embik! |
Hi @embik. 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/test-infra repository. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: embik, rjsadow 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 |
Will look into why this is happening. |
I've fixed the linter issues post-merge of #165, but I'm not sure why the prow job was failing in the first place. Tried to reproduce it by running @rjsadow PR is ready for review now, so maybe this could get an ok-to-test? If the job keeps failing I might need to push 1-2 debug commits to dissect the job environment. |
/ok-to-test |
/retest |
It was a timeout issue due to the constrained nature of the prow job. I'll open a PR in test-infra to bump the job to 2 cpu cores. But it works now. |
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
/lgtm |
/hold |
@embik This looks good, but can you please remove the error handling changes from this PR? I think we've got some other issues and PRs that are looking to update some of that which might conflict. |
I can do that, but then I'll still need to add Do you still want me to go ahead with that? |
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
@rjsadow realised you can just add |
@embik looks good,thanks for doing this! |
golangci-lint
is a pretty good linter for Go projects. This updates the existinghack/verify-golint.sh
script to install that instead ofgolang.org/x/lint/golint
.The
.golangci.yml
configuration file is adapted from https://github.com/kubernetes-sigs/krew/blob/master/.golangci.yml. Felt like a pretty good starting point, we can gradually enable linters that seem useful.This PR is currently a WIP because the new linter uncovers a couple of problems, but some of them are already addressed in #165. I'll wait for that PR to move forward (in any direction) before fixing linter-discovered problems in this PR to minimise conflict with the existing PR.