golang / review
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 129 units with 2,594 lines of code in units (84.2% of code).
    • 0 very complex units (0 lines of code)
    • 6 complex units (764 lines of code)
    • 13 medium complex units (635 lines of code)
    • 17 simple units (460 lines of code)
    • 93 very simple units (735 lines of code)
0% | 29% | 24% | 17% | 28%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
go0% | 29% | 24% | 17% | 28%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
git-codereview0% | 29% | 24% | 17% | 28%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func cmdReword()
in git-codereview/reword.go
163 43 1
func runGofmt()
in git-codereview/gofmt.go
152 39 1
func cmdPending()
in git-codereview/pending.go
120 35 1
func cmdMail()
in git-codereview/mail.go
128 35 1
func cmdSyncBranch()
in git-codereview/sync.go
121 30 1
func formatCommit()
in git-codereview/pending.go
80 28 3
func loadAuth()
in git-codereview/api.go
45 20 0
func main()
in git-codereview/review.go
55 19 0
func checkoutOrCreate()
in git-codereview/change.go
50 16 1
func()
in git-codereview/pending.go
45 16 1
func installHook()
in git-codereview/hook.go
44 14 1
func fixCommitMessage()
in git-codereview/hook.go
42 14 1
func()
in git-codereview/branch.go
62 13 1
func submit()
in git-codereview/submit.go
46 13 2
func syncBranchContinue()
in git-codereview/sync.go
68 13 3
func commitChanges()
in git-codereview/change.go
36 12 1
func cmdSubmit()
in git-codereview/submit.go
48 12 1
func gerritAPI()
in git-codereview/api.go
51 12 3
func checkoutCL()
in git-codereview/change.go
43 11 3
func submitHashes()
in git-codereview/submit.go
40 10 1