bazelbuild / rules_pkg
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 87 units with 1,851 lines of code in units (28.1% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (130 lines of code)
    • 9 medium complex units (485 lines of code)
    • 18 simple units (485 lines of code)
    • 59 very simple units (751 lines of code)
0% | 7% | 26% | 26% | 40%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 9% | 29% | 17% | 44%
go0% | 0% | 17% | 52% | 30%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pkg/private0% | 13% | 26% | 21% | 37%
pkg0% | 0% | 34% | 12% | 53%
deb_packages/tools0% | 0% | 17% | 52% | 30%
pkg/releasing0% | 0% | 30% | 0% | 69%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in pkg/private/tar/build_tar.py
130 31 0
def add_tar()
in pkg/private/archive.py
49 23 7
def SetupWorkdir()
in pkg/make_rpm.py
62 18 11
def add_file()
in pkg/private/archive.py
61 16 12
def workspace_content()
in pkg/releasing/release_tools.py
44 16 8
def CallRpmBuild()
in pkg/make_rpm.py
48 15 3
def add_tree()
in pkg/private/tar/build_tar.py
45 14 6
def CreateDeb()
in pkg/private/deb/make_deb.py
47 13 11
func updateWorkspaceRule()
in deb_packages/tools/update_deb_packages/src/update_deb_packages.go
81 13 2
def add_dir()
in pkg/private/archive.py
48 11 10
def add_manifest_entry()
in pkg/private/tar/build_tar.py
24 10 3
func addNewPackagesToWorkspace()
in deb_packages/tools/update_deb_packages/src/update_deb_packages.go
37 10 1
def _add_manifest_entry()
in pkg/private/zip/build_zip.py
25 9 5
func getPackages()
in deb_packages/tools/update_deb_packages/src/update_deb_packages.go
59 9 6
func getListField()
in deb_packages/tools/update_deb_packages/src/update_deb_packages.go
39 9 4
func getMapField()
in deb_packages/tools/update_deb_packages/src/update_deb_packages.go
36 8 4
func setStringField()
in deb_packages/tools/update_deb_packages/src/update_deb_packages.go
39 8 6
def CreateDebControl()
in pkg/private/deb/make_deb.py
25 7 2
def GetChecksumsFromFile()
in pkg/private/deb/make_deb.py
11 7 2
def GetFlagValue()
in pkg/private/helpers.py
13 7 2