/complexity

parse complexities

Primary LanguageGoApache License 2.0Apache-2.0

complexity

Golang Build Status Coverage Status GoReport

calculate the complexity diff based on the output of gocyclo and gocognit

go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
go install github.com/ericuni/complexity@latest

git checkout master
gocyclo . >base

git checkout target
gocyclo . >current

complexity
Usage of ./complexity:
  -base string
    base path (default "./base")
  -current string
    current path (default "./current")
  -max_complexity int
    when there is a function whose complexity > max_complexity, exit with status 1 (default 20)
  -min_complexity int
    do not display those functions with complexity < min_complexity (default 5)