Skip to content

Conversation

@JCPrice0024
Copy link
Contributor

The complexity of handlePgpass was 30 and most of it seemed unnecessary as there was an anonymous func that was used like a named function and the for loop for scanner.Scan added at least 15 points of complexity alone. So I broke out the anonymous function and made the for loop run through a function with the same functionality as the original loop. I was unable to test the changes however, the complexity of all three has been reduced to under 15 and is ready to be tested. Here is the before and after sonar reports:

image
Web capture_30-11-2022_103312_localhost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants