bazelbuild / rules_cc
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 129 units with 2,408 lines of code in units (22.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 22 medium complex units (1,042 lines of code)
    • 16 simple units (467 lines of code)
    • 91 very simple units (899 lines of code)
0% | 0% | 43% | 19% | 37%
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% | 0% | 71% | 11% | 16%
go0% | 0% | 23% | 23% | 53%
cc0% | 0% | 32% | 31% | 35%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tools/migration0% | 0% | 44% | 18% | 37%
tools/runfiles0% | 0% | 40% | 18% | 40%
cc/private/toolchain0% | 0% | 0% | 81% | 18%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def migrate_legacy_fields()
in tools/migration/legacy_fields_migration_lib.py
185 21 1
func Transform()
in tools/migration/crosstool_to_starlark_lib.go
101 20 1
def compare_ctoolchains()
in tools/migration/ctoolchain_comparator_lib.py
62 18 2
def _extract_legacy_link_flag_sets_for()
in tools/migration/legacy_fields_migration_lib.py
55 16 1
def _compare_features()
in tools/migration/ctoolchain_comparator_lib.py
52 16 2
def _compare_action_configs()
in tools/migration/ctoolchain_comparator_lib.py
52 16 2
bool PathsFrom()
in tools/runfiles/runfiles_src.cc
43 14 7
def _extract_legacy_compile_flag_sets_for()
in tools/migration/legacy_fields_migration_lib.py
24 14 1
def _check_feature_equivalence()
in tools/migration/ctoolchain_comparator_lib.py
25 14 2
def _compare_tool_paths()
in tools/migration/ctoolchain_comparator_lib.py
42 14 2
def _rename_feature_in()
in tools/migration/legacy_fields_migration_lib.py
23 12 3
func parseFlagGroup()
in tools/migration/crosstool_to_starlark_lib.go
48 12 2
def _compare_make_variables()
in tools/migration/ctoolchain_comparator_lib.py
41 12 2
def _compare_artifact_name_patterns()
in tools/migration/ctoolchain_comparator_lib.py
45 12 2
bool IsAbsolute()
in tools/runfiles/runfiles_src.cc
10 11 1
string Runfiles::Rlocation()
in tools/runfiles/runfiles_src.cc
18 11 1
def main()
in tools/migration/crosstool_query.py
27 11 1
func getStringStatement()
in tools/migration/crosstool_to_starlark_lib.go
30 11 4
func getStringArrStatement()
in tools/migration/crosstool_to_starlark_lib.go
60 11 5
func getIfStatement()
in tools/migration/crosstool_to_starlark_lib.go
56 11 7