bazelbuild / rules_license
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 11 units with 98 lines of code in units (13.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (26 lines of code)
    • 2 small units (29 lines of code)
    • 8 very small units (43 lines of code)
0% | 0% | 26% | 29% | 43%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 26% | 29% | 43%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tools0% | 0% | 42% | 26% | 31%
admin/refresh_spdx0% | 0% | 0% | 35% | 64%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def main()
in tools/checker_demo.py
26 5 0
def _check_conditions()
in tools/checker_demo.py
16 6 3
def add_new()
in admin/refresh_spdx/add_licenses.py
13 3 2
def update_spdx_build()
in admin/refresh_spdx/add_licenses.py
10 1 0
def gather_target_names()
in admin/refresh_spdx/add_licenses.py
8 3 1
def _do_report()
in tools/checker_demo.py
6 3 2
def _do_licenses()
in tools/checker_demo.py
6 2 2
def _do_copyright_notices()
in tools/checker_demo.py
4 3 2
def load_json()
in admin/refresh_spdx/add_licenses.py
4 1 1
def _get_licenses()
in tools/checker_demo.py
3 1 1
def main()
in admin/refresh_spdx/add_licenses.py
2 1 0