Gocognito calculates cognitive complexities of functions in Go source files. Intutive difficulty for programmers is reflected in cognitive complexity.
go install github.com/nrnrk/gocognito/cmd/gocognito@latest
$ gocognito
gocognito: Calculate cognitive complexity of functions.
Usage: gocognito [-flag] [package]
The gocognito analysis reports functions whose complexity is over than the specified limit.
...
Examples:
gocognit .
gocognit main.go
gocognit -over 10 ./pkg/...
- Gocognit where the codes are based on.