kubernetes / website
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 31 units with 563 lines of code in units (1.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (49 lines of code)
    • 2 medium complex units (141 lines of code)
    • 7 simple units (164 lines of code)
    • 21 very simple units (209 lines of code)
0% | 8% | 25% | 29% | 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% | 8% | 25% | 29% | 37%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
scripts0% | 11% | 15% | 32% | 41%
update-imported-docs0% | 0% | 52% | 21% | 26%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def check_target()
in scripts/linkchecker.py
49 29 3
def main()
in update-imported-docs/update-imported-docs.py
79 16 0
def process_diff_status()
in scripts/diff_l10n_branches.py
62 14 5
def validate_links()
in scripts/linkchecker.py
32 9 1
def process_file()
in update-imported-docs/update-imported-docs.py
32 8 6
def strip_comments()
in scripts/linkchecker.py
22 7 1
def main()
in scripts/linkchecker.py
28 7 0
def new_record()
in scripts/linkchecker.py
16 6 3
def check_file_exists()
in scripts/linkchecker.py
15 6 3
def get_redirect()
in scripts/linkchecker.py
19 6 1
def check_dir()
in scripts/check-ctrlcode.py
12 5 2
def check_ctrlcode()
in scripts/check-ctrlcode.py
15 5 1
def process_links()
in update-imported-docs/update-imported-docs.py
19 5 3
def dump_result()
in scripts/linkchecker.py
11 4 0
def check_apiref_target()
in scripts/linkchecker.py
10 4 2
def main()
in scripts/check-ctrlcode.py
12 3 0
def normalize_filename()
in scripts/linkchecker.py
8 3 2
def check_anchor()
in scripts/linkchecker.py
15 3 2
def process_kubectl_links()
in update-imported-docs/update-imported-docs.py
12 3 1
def main()
in scripts/find_pr.py
5 2 4