Cyclop calculates cyclomatic complexities of functions or packages in Go source code.
Cyclop, compared to other alternative, calculates both function and package cyclomatic complexity.
go get github.com/bkielbasa/cyclop/cmd/cyclop
cyclop .
Available parameters:
-maxComplexity int- the max complexity calculated for a single function.10by default-packageAverage float64- the average cyclomatic complexity for a package. If the value is higher than0it will raise an error if the average will be higher.0default.-skipTests bool- should checks be executed in tests files.falseby default