Closed ammario closed 3 years ago
Doc comments (above the function) usually describe the purpose and contract of a function, not its implementation details.
Comments describing the implementation details would be inside the function. Weighing these against the cyclomatic complexity is outside the scope of this project. I think gocyclo should do only one thing and do it well - that is, calculating cyclomatic complexity.
If you want to exclude individual functions from the output, because their complexity is justified, it is now possible with the //gocyclo:ignore
directive.
It would be nice if gocycle had an option that let complex functions pass as long as they had a doc comment.
If this sounds good, I'm happy to implement it.