Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alecthomas/gocyclo
Calculate cyclomatic complexities of functions in Go source code.
https://github.com/alecthomas/gocyclo
Last synced: 3 months ago
JSON representation
Calculate cyclomatic complexities of functions in Go source code.
- Host: GitHub
- URL: https://github.com/alecthomas/gocyclo
- Owner: alecthomas
- License: bsd-3-clause
- Fork: true (fzipp/gocyclo)
- Created: 2015-02-08T22:09:54.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-07-25T12:47:02.000Z (over 7 years ago)
- Last Synced: 2024-06-18T18:43:57.829Z (5 months ago)
- Language: Go
- Size: 95.7 KB
- Stars: 31
- Watchers: 5
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Gocyclo calculates cyclomatic complexities of functions in Go source code.
The cyclomatic complexity of a function is calculated according to the
following rules:1 is the base complexity of a function
+1 for each 'if', 'for', 'case', '&&' or '||'To install, run
$ go get github.com/fzipp/gocyclo
and put the resulting binary in one of your PATH directories if
`$GOPATH/bin` isn't already in your PATH.Usage:
$ gocyclo [ ...] ...
Examples:
$ gocyclo .
$ gocyclo main.go
$ gocyclo -top 10 src/
$ gocyclo -over 25 docker
$ gocyclo -avg .The output fields for each line are: