fzipp / gocyclo

Calculate cyclomatic complexities of functions in Go source code.
BSD 3-Clause "New" or "Revised" License
1.33k stars 81 forks source link

How to ignore local function? #49

Open henry-infevo opened 2 years ago

henry-infevo commented 2 years ago

I usually use local functions to split my main function to multiple part and group related functions together. However, gocyclo always report the complexity of my main function is high (e.g: 20) while it looks lower if we remove the local functions.

Can we have an option to exclude the local functions from calculation?