- Notifications
You must be signed in to change notification settings - Fork 1.2k
✨Update golangci-lint version and modernize lint #3384
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
base: main
Are you sure you want to change the base?
✨Update golangci-lint version and modernize lint #3384
Conversation
|
|
| [APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dongjiang1989 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 |
| 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. 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-sigs/prow repository. |
9b65ccf to e03558d Compare e03558d to c6f2967 Compare
alvaroaleman left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would we disable the deprecation warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use local nolint comments for these cases. We just deprecated CustomDefaulter/CustomValidator we cannot remove them that quickly
82ddc3b to b0d2fd2 Compare 3c7cef5 to 3d6b16f Compare | /test pull-controller-runtime-test |
5cacdee to 5a7db5c Compare 2a0199d to 04c96ad Compare Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
59cb662 to c01736f Compare
interface{}toany