Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Update statickcheck for Go 1.18 #179

Merged
merged 1 commit into from
Apr 3, 2022

Conversation

adrianludwin
Copy link
Contributor

Tested: static check fails on Go 1.18 without this change, passes with
it.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 2, 2022
@adrianludwin adrianludwin added this to the release-v1.1 milestone Apr 2, 2022
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 2, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianludwin

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 requested review from srampal and tashimi April 2, 2022 05:51
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 2, 2022
@adrianludwin
Copy link
Contributor Author

/assign @rjbez17
/assign @erikgb

@erikgb
Copy link
Contributor

erikgb commented Apr 2, 2022

@adrianludwin This does not seem to work using Go 1.17, and I do not think we should require 1.18 before K8s is fully migrated to 1.18. I get the same error as the CI when trying to build your branch:

D:~/projects/github/hierarchical-namespaces $ go version
go version go1.17.8 linux/amd64
D:~/projects/github/hierarchical-namespaces $ make
go build -o /home/erikbo/projects/github/hierarchical-namespaces/bin/controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen
/home/erikbo/projects/github/hierarchical-namespaces/bin/controller-gen object:headerFile=./hack/boilerplate.go.txt paths=./api/...
gofmt -l -w ./api ./cmd ./internal
go vet ./api/... ./cmd/... ./internal/...
go build -o /home/erikbo/projects/github/hierarchical-namespaces/bin/staticcheck honnef.co/go/tools/cmd/staticcheck
/home/erikbo/projects/github/hierarchical-namespaces/bin/staticcheck ./api/... ./cmd/... ./internal/...
internal/kubectl/configset.go:81:2: this linter directive didn't match anything; should it be removed? (staticcheck)
make: *** [Makefile:206: staticcheck] Error 1
D:~/projects/github/hierarchical-namespaces $ 

Tested: static check fails on Go 1.18 without this change, passes with
it.
@erikgb
Copy link
Contributor

erikgb commented Apr 3, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 3, 2022
@k8s-ci-robot k8s-ci-robot merged commit 459ab1d into kubernetes-retired:master Apr 3, 2022
@adrianludwin adrianludwin deleted the staticcheck branch April 5, 2022 01:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants