-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Hygiene: enable additional lint presets. #6247
Conversation
This PR opts us into remaining `golangci` presets and removes the `disable-all` configuration such that we automatically inherit new default linters. To get here, I opted out from `staticcheck` and `ineffassign`, both of which will require us to clean up existing issues prior to enablement. That can be done in future PRs. Context: #5899
/test check-pr-has-kind-label |
@bendory: The specified target(s) for
The following commands are available to trigger optional jobs:
Use In response to this:
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. |
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 David for this!
I think the change looks good, just asking @vdemeester for his opinion before merging
@@ -14,7 +14,6 @@ linters-settings: | |||
packages-with-error-message: | |||
- k8s.io/apimachinery/pkg/util/clock: 'use k8s.io/utils/clock or k8s.io/utils/clock/testing' | |||
linters: | |||
disable-all: true |
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.
I guess this is ok since we pin the version of the linter we use.
We should not have new linters be added to our CI without a PR as that would randomly break tests.
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.
Exactly my thinking -- when a new golangci
linter version comes along with new linters (or versions of linters) enabled, that will be caught in the PR that upgrades to the new version(s).
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jerop, vdemeester 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 |
/lgtm |
Changes
This PR opts us into remaining
golangci
presets and removes thedisable-all
configuration such that we automatically inherit new default linters.To get here, I opted out from
staticcheck
andineffassign
, both of which will require us to clean up existing issues prior to enablement. That can be done in future PRs.Context: #5899
/kind cleanup
Submitter Checklist
functionality, content, code)
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes