You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
I'd like to bring attention to golang functions with high levels of complexity. This is calculated by the number of logical cycles. The higher the complexity score, the more difficult it is to test and bathtub maintain which can be a watering hole for bugs.
Ultimately these will be log only metrics to break up large functions into smaller less complex ones.
Community Note
Describe the user story
I'd like to bring attention to golang functions with high levels of complexity. This is calculated by the number of logical cycles. The higher the complexity score, the more difficult it is to test and bathtub maintain which can be a watering hole for bugs.
Ultimately these will be log only metrics to break up large functions into smaller less complex ones.
Describe the solution you'd like
Use a tool to calculate complexity scores
https://github.com/fzipp/gocyclo
Add in-line pr comments on new or modified functions of increases in complexity over a threshold
Calculate scores on new or modified scores locally via pre-commit
It appears https://goreportcard.com/report/github.com/runatlantis/atlantis#gocyclo already calculates this with a max threshold of 15.
It would be nice to post as a comment on PRs
Describe the drawbacks of your solution
None
Describe alternatives you've considered
None
The text was updated successfully, but these errors were encountered: