Skip to content
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

Is there potential for reducing cyclomatic complexity of check_input() #2

Open
annakrystalli opened this issue Feb 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@annakrystalli
Copy link
Member

annakrystalli commented Feb 15, 2024

check_input() is an internal function used to check that inputs to functions of the create_* 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?

@annakrystalli annakrystalli added the enhancement New feature or request label Feb 15, 2024
@annakrystalli annakrystalli transferred this issue from hubverse-org/hubUtils Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant