-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Re-enable goconst
linter for test files
#9623
Comments
goconst
linter for tests goconst
linter for test files
/triage accepted Thanks! |
/help First steps to figure this out are to try some of the other configuration options for |
@killianmuldoon: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed 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. |
Sounds reasonable |
fwiw, I'm fine, for tests, to have this disabled |
Closing this, no need to have constants in tests unless absolutely necessary. /close |
@vincepri: Closing this issue. 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. |
In this PR
goconst
linter was disabled for test files - to exclude test files from creating lint issues, for a string value with > 3 occurrences.However most of these string values in test files enhance the readability if the respective test cases. E.g. https://github.com/kubernetes-sigs/cluster-api/blob/main/bootstrap/kubeadm/types/utils_test.go#L260
The linter should not be completely excluded for tests in the long term.
A solution to either fix all lint issues or increase the occurrence default value should be implemented.
The text was updated successfully, but these errors were encountered: