codeclimate-gocyclo
is a Code Climate engine that wraps Gocyclo. You can run it on your command line using the Code Climate CLI, or on our hosted analysis platform.
Gocyclo calculates cyclomatic complexities of functions in Go source code.
- If you haven't already, install the Code Climate CLI.
- Run
codeclimate engines:enable gocyclo
. This command both installs the engine and enables it in your.codeclimate.yml
file. - You're ready to analyze! Browse into your project's folder and run
codeclimate analyze
.
Like the gocyclo
binary, you can configure the minimum allowed cyclomatic complexity
The default value is 9
: you can configure your own threshold in your .codeclimate.yml
:
version: "2"
plugins:
gocyclo:
enabled: true
config:
over: 5
docker build -t codeclimate/codeclimate-gocyclo .