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

Consider single return per statement #190

Open
dccutrig opened this issue Jul 20, 2023 · 2 comments
Open

Consider single return per statement #190

dccutrig opened this issue Jul 20, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@dccutrig
Copy link
Contributor

Originally layout made sense. Making issue for internal discussion of having just one return per function, perhaps utilizing gotoreturn labels. ISsue to be discussed / closed / modified as appropriate.

@dccutrig dccutrig added the bug Something isn't working label Jul 20, 2023
@jlucas9 jlucas9 moved this to In Progress in CryptoLib Path Forward Jul 21, 2023
@jlucas9 jlucas9 moved this from In Progress to Backlog in CryptoLib Path Forward Dec 13, 2023
@jlucas9 jlucas9 moved this from Backlog to Planned Next Release in CryptoLib Path Forward Jan 25, 2024
@Donnie-Ice
Copy link
Contributor

Put a halt on this due to rapidly increasing cyclomatic complexity. If you replace the early returns with a status message that gets returned at the end, you must add a ton of 'if' statements checking if the function should be returned.

@rjbrown2
Copy link
Member

rjbrown2 commented Sep 4, 2024

We may want to revisit now that we've reduced complexity once (Mainly because we still have to revisit on the KMC side once open source containers are released).
If we can provide single returns, and then break functions up into smaller pieces as they make sense, we can reduce complexity again, and probably improve test coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Planned Next Sprint
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants