✨Update golangci-lint version and modernize lint #3384
✨Update golangci-lint version and modernize lint #3384k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
Conversation
|
|
|
Hi @dongjiang1989. Thanks for your PR. I'm waiting for a github.com 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. DetailsInstructions 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-sigs/prow repository. |
9b65ccf to
e03558d
Compare
e03558d to
c6f2967
Compare
.golangci.yml
Outdated
| text: 'SA1019: .*The component config package has been deprecated and will be removed in a future release.' | ||
| - linters: | ||
| - staticcheck | ||
| text: 'SA1019: .* is deprecated: .* is deprecated, use .* instead ' |
There was a problem hiding this comment.
Why would we disable the deprecation warning?
There was a problem hiding this comment.
Thanks @alvaroaleman
Some deprecated functions were found. I think we can fix them in the next PR.
pkg/builder/webhook.go:42:28: SA1019: admission.CustomDefaulter is deprecated: CustomDefaulter is deprecated, use Defaulter instead (staticcheck)
customDefaulter admission.CustomDefaulter
^
pkg/builder/webhook.go:45:28: SA1019: admission.CustomValidator is deprecated: CustomValidator is deprecated, use Validator instead (staticcheck)
customValidator admission.CustomValidator
^
pkg/builder/webhook.go:311:7: SA1019: admission.WithCustomValidator is deprecated: WithCustomValidator is deprecated, use WithValidator instead (staticcheck)
w = admission.WithCustomValidator(blder.mgr.GetScheme(), blder.apiType, blder.customValidator)
^
pkg/builder/webhook_test.go:1183:7: SA1019: admission.CustomDefaulter is deprecated: CustomDefaulter is deprecated, use Defaulter instead (staticcheck)
var _ admission.CustomDefaulter = &TestCustomDefaulter{}
^
pkg/builder/webhook_test.go:1266:7: SA1019: admission.CustomValidator is deprecated: CustomValidator is deprecated, use Validator instead (staticcheck)
var _ admission.CustomValidator = &TestCustomValidator{}
^
pkg/builder/webhook_test.go:1289:7: SA1019: admission.CustomDefaulter is deprecated: CustomDefaulter is deprecated, use Defaulter instead (staticcheck)
var _ admission.CustomDefaulter = &TestCustomDefaulter{}
^
pkg/builder/webhook_test.go:1348:7: SA1019: admission.CustomValidator is deprecated: CustomValidator is deprecated, use Validator instead (staticcheck)
var _ admission.CustomValidator = &TestCustomValidator{}
^
pkg/webhook/alias.go:29:24: SA1019: admission.CustomDefaulter is deprecated: CustomDefaulter is deprecated, use Defaulter instead (staticcheck)
type CustomDefaulter = admission.CustomDefaulter
^
pkg/webhook/alias.go:34:24: SA1019: admission.CustomValidator is deprecated: CustomValidator is deprecated, use Validator instead (staticcheck)
type CustomValidator = admission.CustomValidator
^
9 issues:
* staticcheck: 9
There was a problem hiding this comment.
Let's use local nolint comments for these cases. We just deprecated CustomDefaulter/CustomValidator we cannot remove them that quickly
There was a problem hiding this comment.
Let's use local nolint comments for these cases. We just deprecated CustomDefaulter/CustomValidator we cannot remove them that quickly
Thanks @sbueringer
Got it
There was a problem hiding this comment.
Please remove this, we do not want to globally disable deprecation checks. Please add local nolint comments as needed instead, like Stefan suggested
82ddc3b to
b0d2fd2
Compare
3c7cef5 to
3d6b16f
Compare
|
/test pull-controller-runtime-test |
5cacdee to
5a7db5c
Compare
59cb662 to
c01736f
Compare
|
@alvaroaleman Please re-check it, thanks |
Signed-off-by: dongjiang1989 <dongjiang1989@126.com> by codereview Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
3323208 to
a0b87dc
Compare
|
/test pull-controller-runtime-test |
|
LGTM label has been added. DetailsGit tree hash: 7bc2b3fba10600f0428181b99a759cc40a44690a |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, dongjiang1989 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
interface{}toany