Is there potential for reducing cyclomatic complexity of check_input()
#2
Labels
enhancement
New feature or request
check_input()
#2
check_input()
is an internal function used to check that inputs to functions of thecreate_*
family of functions (used to create hub config programmatically) conform to expectation defined in the hubverse schema.As such the function is run for it's side effects only of throwing errors if a given condition is not met.
It has a high cyclomatic complexity (51) because it is composed of primarily if statements, used to deploy the appropriate according to the property of the input being checked. I dont think this is really a problem for the function as I don't see an obvious way around using if statements to deploy the correct checks. Because of this, Aat the moment I'm silencing the linting issue but open to other opinions on whether:
a) this is really a problem to concern ourselves with?
b) If yes, any suggestions of how to address it?
The text was updated successfully, but these errors were encountered: