GitHunt
NO

nodirt/gocyclo

Calculate cyclomatic complexities of functions in Go source code.

Command gocyclo calculates cyclomatic complexities of functions in Go source code.

For more information on the metric refer to https://en.wikipedia.org/wiki/Cyclomatic_complexity.

To install, run

$ go get github.com/nodirt/gocyclo

Usage:

$ gocyclo [<flag> ...] <Go file or package> ...

Examples:

$ gocyclo .
$ gocyclo main.go
$ gocyclo -top 10 src/
$ gocyclo -over 25 docker
$ gocyclo -avg .

The output fields for each line are:

<complexity> <full function name> <file:row:column>

Languages

Go100.0%

Contributors

BSD 3-Clause "New" or "Revised" License
Created June 17, 2016
Updated July 29, 2022
nodirt/gocyclo | GitHunt