bazelbuild / bazel-central-registry
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 28 units with 321 lines of code in units (35.8% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (161 lines of code)
    • 1 medium size units (29 lines of code)
    • 3 small units (51 lines of code)
    • 22 very small units (80 lines of code)
0% | 50% | 9% | 15% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 50% | 9% | 15% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tools0% | 50% | 9% | 15% | 24%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def add()
in tools/registry.py
97 18 3
def from_user_input()
in tools/add_module.py
64 23 0
def main()
in tools/add_module.py
29 4 1
def get_maintainers_from_input()
in tools/add_module.py
18 3 0
def yes_or_no()
in tools/add_module.py
17 6 2
def __init__()
in tools/registry.py
16 1 4
def init_module()
in tools/registry.py
10 1 4
def delete()
in tools/registry.py
8 2 3
def add_build_target()
in tools/registry.py
5 2 2
def contains()
in tools/registry.py
5 2 3
def json_dump()
in tools/registry.py
4 1 2
def set_source()
in tools/registry.py
4 1 3
def download()
in tools/registry.py
3 1 1
def read()
in tools/registry.py
3 1 1
def integrity()
in tools/registry.py
3 1 1
def add_dep()
in tools/registry.py
3 1 3
def set_module_dot_bazel()
in tools/registry.py
3 1 2
def add_patch()
in tools/registry.py
3 1 2
def set_patch_strip()
in tools/registry.py
3 1 2
def set_build_file()
in tools/registry.py
3 1 2