Gocyclo is a code complexity linter. It uses cyclomatic complexity. Cyclomatic complexity essentially measures the number of different paths code could go through. (The conditional in a for loop counts as adding one path) It looks at this on a per-function level. The idea that this would be enforcing is that if there are too many different paths code can go through in a function, it needs to be better split up. (A function with too many code paths is hard to reason about) The complexity which we want the linter to start failing on is configurable. The default is 10. Change the "Cyclo" parameter in `tools/gometalinter.json` to try other values. |
||
|---|---|---|
| .. | ||
| gometalinter.json | ||
| Makefile | ||