gateway-api icon indicating copy to clipboard operation
gateway-api copied to clipboard

Update golangci-lint (1.46.2->1.50.0)

Open oscr opened this issue 3 years ago • 5 comments

What type of PR is this?

/kind bug /kind cleanup

What this PR does / why we need it:

Updates the golangci-lint version from 1.46.2 -> 1.49.0 and fixes all the findings. This is needed due to linters being disabled currently. Also adds make lint target which just makes it easier for developers.

Here is the current main branch linter output:

hack/verify-golint.sh
level=warning msg="[linters context] bodyclose is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649."
level=warning msg="[linters context] contextcheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649."
level=warning msg="[linters context] nilerr is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649."
level=warning msg="[linters context] noctx is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649."
level=warning msg="[linters context] rowserrcheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649."
level=warning msg="[linters context] sqlclosecheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649."
level=warning msg="[linters context] structcheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649."
level=warning msg="[linters context] unparam is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649."

Does this PR introduce a user-facing change?:

NONE

oscr avatar Sep 28 '22 12:09 oscr

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: oscr Once this PR has been reviewed and has the lgtm label, please assign dcbw for approval by writing /assign @dcbw in a comment. For more information see:The Kubernetes Code Review Process.

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 /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Sep 28 '22 12:09 k8s-ci-robot

Could we rebase the PR? I see that there are other changes as well which I think are not related to this PR

akankshakumari393 avatar Sep 28 '22 17:09 akankshakumari393

@oscr Thanks for filing this PR! I think the presubmit is failing because you need to run make generate to update the generated CRD yamls.

 M config/crd/experimental/gateway.networking.k8s.io_grpcroutes.yaml
 M config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml
 M config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml
 M config/crd/standard/gateway.networking.k8s.io_httproutes.yaml

robscott avatar Sep 30 '22 03:09 robscott

@robscott Thank you! That seems to have solved it.

oscr avatar Sep 30 '22 07:09 oscr

Newer version released. Updating pr with latest and greatest.

oscr avatar Oct 04 '22 20:10 oscr

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

k8s-ci-robot avatar Nov 05 '22 12:11 k8s-ci-robot