bazelbuild / bazel-skylib
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 19 units with 181 lines of code in units (6.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (102 lines of code)
    • 2 small units (31 lines of code)
    • 14 very small units (48 lines of code)
0% | 0% | 56% | 17% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 0% | 56% | 17% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
gazelle/bzl0% | 0% | 56% | 17% | 26%
Alternative Visuals
Longest Units
Top 19 longest units
Unit# linesMcCabe index# params
func()
in gazelle/bzl/gazelle.go
41 10 1
func generateEmpty()
in gazelle/bzl/gazelle.go
32 10 1
func()
in gazelle/bzl/gazelle.go
29 6 1
func getBzlFileLoads()
in gazelle/bzl/gazelle.go
19 4 1
func()
in gazelle/bzl/gazelle.go
12 2 1
func checkInternalVisibility()
in gazelle/bzl/gazelle.go
10 5 2
func()
in gazelle/bzl/gazelle.go
8 3 1
func()
in gazelle/bzl/gazelle.go
8 3 1
func()
in gazelle/bzl/gazelle.go
6 1 1
func NewLanguage()
in gazelle/bzl/gazelle.go
3 1 0
func()
in gazelle/bzl/gazelle.go
3 1 1
func isBzlSourceFile()
in gazelle/bzl/gazelle.go
3 2 1
func()
in gazelle/bzl/gazelle.go
1 1 1
func()
in gazelle/bzl/gazelle.go
1 1 1
func()
in gazelle/bzl/gazelle.go
1 1 1
func()
in gazelle/bzl/gazelle.go
1 1 1
func()
in gazelle/bzl/gazelle.go
1 1 1
func()
in gazelle/bzl/gazelle.go
1 1 1
func()
in gazelle/bzl/gazelle.go
1 1 1