{"repo":"fzipp/gocyclo","free":true,"listed":false,"github":"https://github.com/fzipp/gocyclo","clone":"git clone https://github.com/fzipp/gocyclo.git","description":"Calculate cyclomatic complexities of functions in Go source code.","language":"Go","stars":1595,"topics":["cyclomatic-complexity","code-metrics","go","golang","mccabe-metric","mccabe","software-metrics"],"license":"BSD-3-Clause","category":"dev-tools","readme_excerpt":"gocyclo Gocyclo calculates cyclomatic complexities of functions in Go source code. Cyclomatic complexity is a code quality metric which can be used to identify code that needs refactoring. It measures the number of linearly independent paths through a function's source code. The cyclomatic complexity of a function is calculated according to the following rules: A function with a higher cyclomatic complexity requires more test cases to cover all possible paths and is potentially harder to understand. The complexity can be reduced by applying common refactoring techniques that lead to smaller functions. Installation To install the gocyclo command, run and put the resulting binary in one of your PATH directories if $GOPATH/bin isn't already in your PATH. Usage Examples Example output: Note that the average is calculated over all analyzed functions, not just the printed ones. Ignoring individual functions Individual functions can be ignored with a gocyclo:ignore directive: License This project is free and open source software licensed under the BSD 3-Clause License.","default_branch":null,"files":null,"tree":[],"storefront":"/r/fzipp","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fzipp/gocyclo/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}