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

✨ Update to golangci-lint v1.18.0 #1415

Merged
merged 4 commits into from
Sep 12, 2019
Merged

✨ Update to golangci-lint v1.18.0 #1415

merged 4 commits into from
Sep 12, 2019

Conversation

tpounds
Copy link
Contributor

@tpounds tpounds commented Sep 12, 2019

What this PR does / why we need it:

Updates to the latest golangci-lint release that includes fixes for Go 1.13.x. Also, contains minor fixes for gosimple warnings and enables all linters by default, disabling any that are current noisy.

S1011: should replace loop with `x = append(x, y...)`
Updates .golangci.yml to enable all linters by default
and disable noisy ones. This explicitly documents which
linters are not being used by the project.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 12, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @tpounds. Thanks for your PR.

I'm waiting for a kubernetes-sigs or kubernetes 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 12, 2019
- scopelint
- staticcheck
- unparam
- unused
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to see if we can shorten this list. Ideally, I'd like to see if we can get down to just disabling dupl, gochecknoglobals, gochecknoinits, gocyclo, and lll, otherwise this lgtm

Copy link
Contributor Author

@tpounds tpounds Sep 12, 2019

Choose a reason for hiding this comment

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

@detiber Agree. I tried enabling a few others but they are all pretty noisy right now. I figured this was a good starting point to at least document which linters are disabled and let someone take a stab at pruning this list over time.

Copy link
Member

Choose a reason for hiding this comment

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

sgtm

@detiber
Copy link
Member

detiber commented Sep 12, 2019

/lgtm
/assign @vincepri

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 12, 2019
@detiber
Copy link
Member

detiber commented Sep 12, 2019

/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. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Sep 12, 2019
# Run with --fast=false for more extensive checks
fast: true
issue:
max-same-issues: 0
max-per-linter: 0
max-issues-per-linter: 0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@detiber FYI I just added a commit to address this incorrect option.

@detiber
Copy link
Member

detiber commented Sep 12, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 12, 2019
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.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tpounds, vincepri

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Sep 12, 2019
@detiber
Copy link
Member

detiber commented Sep 12, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 12, 2019
@k8s-ci-robot k8s-ci-robot merged commit a15c012 into kubernetes-sigs:master Sep 12, 2019
@tpounds tpounds deleted the golangci-lint-v1.18.0 branch September 12, 2019 17:10
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. 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.

None yet

4 participants