golang / review
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 129 units with 2,594 lines of code in units (84.2% of code).
    • 5 very long units (684 lines of code)
    • 5 long units (316 lines of code)
    • 24 medium size units (829 lines of code)
    • 22 small units (337 lines of code)
    • 73 very small units (428 lines of code)
26% | 12% | 31% | 12% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go26% | 12% | 31% | 12% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
git-codereview26% | 12% | 31% | 12% | 16%
Alternative Visuals
Longest Units
Top 20 longest 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 cmdMail()
in git-codereview/mail.go
128 35 1
func cmdSyncBranch()
in git-codereview/sync.go
121 30 1
func cmdPending()
in git-codereview/pending.go
120 35 1
func formatCommit()
in git-codereview/pending.go
80 28 3
func syncBranchContinue()
in git-codereview/sync.go
68 13 3
func()
in git-codereview/branch.go
62 13 1
func main()
in git-codereview/review.go
55 19 0
func gerritAPI()
in git-codereview/api.go
51 12 3
func checkoutOrCreate()
in git-codereview/change.go
50 16 1
func cmdSubmit()
in git-codereview/submit.go
48 12 1
func loadGerritOriginInternal()
in git-codereview/api.go
47 9 2
func submit()
in git-codereview/submit.go
46 13 2
func()
in git-codereview/pending.go
45 16 1
func loadAuth()
in git-codereview/api.go
45 20 0
func installHook()
in git-codereview/hook.go
44 14 1
func checkoutCL()
in git-codereview/change.go
43 11 3
func fixCommitMessage()
in git-codereview/hook.go
42 14 1
func submitHashes()
in git-codereview/submit.go
40 10 1