microsoft / fabrikate
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 117 units with 1,626 lines of code in units (76.6% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (286 lines of code)
    • 12 medium size units (389 lines of code)
    • 39 small units (591 lines of code)
    • 62 very small units (360 lines of code)
0% | 17% | 23% | 36% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 17% | 23% | 36% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
internal/git0% | 52% | 0% | 23% | 24%
internal/core0% | 15% | 17% | 45% | 21%
internal/helm0% | 44% | 0% | 55% | 0%
internal/generators0% | 25% | 50% | 19% | 4%
internal/cmd0% | 0% | 52% | 31% | 16%
util0% | 0% | 0% | 100% | 0%
internal/url0% | 0% | 0% | 100% | 0%
internal/logger0% | 0% | 0% | 0% | 100%
cmd/fab0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in internal/git/core.go
78 11 1
func WalkComponentTree()
in internal/core/component.go
75 12 4
func DependencyUpdate()
in internal/helm/dependency.go
70 15 1
func()
in internal/generators/helm.go
63 15 1
func()
in internal/generators/helm.go
49 16 1
func Install()
in internal/cmd/install.go
46 12 1
func Set()
in internal/cmd/set.go
46 12 5
func addNamespaceToManifests()
in internal/generators/helm.go
40 7 2
func()
in internal/generators/static.go
37 9 1
func Generate()
in internal/cmd/generate.go
36 9 3
func()
in internal/core/component.go
25 6 1
func Add()
in internal/cmd/add.go
23 4 1
func Remove()
in internal/cmd/remove.go
23 4 1
func()
in internal/core/component.go
22 6 1
func()
in internal/core/component.go
21 7 1
func()
in internal/core/component.go
21 7 1
func GetFabrikateComponents()
in internal/cmd/find.go
20 5 1
func Pull()
in internal/helm/pull.go
20 4 4
func FindComponent()
in internal/cmd/find.go
19 5 1
func SplitPathValuePairs()
in internal/cmd/set.go
19 4 1