-
Notifications
You must be signed in to change notification settings - Fork 425
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
Reduce complexity of Parameters()
func
#3810
Comments
/help |
@mboersma: 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. |
Parameters()
funcParameters()
func
/priority backlog |
/kind cleanup |
/assign |
@lakshkeswani can we give you any help with this task? |
@mboersma No Thanks, I have just started to working on it. |
I would be happy to work on it... @mboersma |
@souhardya79 please do, I assigned you to the task and I'm happy to review any PR. |
/assign i will give it another try, hopefully just by grouping things into logical blocks |
/kind bug
What steps did you take and what happened:
The
ManagedClusterSpec.Parameters()
func is long, with manyif
s andnil
checks, so it currently exceeds the maximum cyclomatic complexity allowed by thegocyclo
linter. We've disabled that linter for this func.What did you expect to happen:
The func could be refactored to reduce cyclomatic complexity, perhaps by breaking it into multiple funcs. Existing unit test coverage should be preserved (or improved) across the refactor, and the
//nolint:gocyclo
comment should be removed.Anything else you would like to add:
You can test locally that your refactoring succeeds with
make lint
.Environment:
main
kubectl version
): N/A/etc/os-release
): N/AThe text was updated successfully, but these errors were encountered: