kubernetes / org
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 18 units with 252 lines of code in units (2.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (102 lines of code)
    • 2 simple units (36 lines of code)
    • 13 very simple units (114 lines of code)
0% | 0% | 40% | 14% | 45%
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% | 40% | 6% | 52%
go0% | 0% | 40% | 24% | 34%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
hack/boilerplate0% | 0% | 40% | 6% | 52%
cmd/merge0% | 0% | 40% | 24% | 34%
Most Complex Units
Top 18 most complex units
Unit# linesMcCabe index# params
def file_passes()
in hack/boilerplate/verify_boilerplate.py
38 18 3
func loadOrgs()
in cmd/merge/main.go
43 15 1
def get_files()
in hack/boilerplate/verify_boilerplate.py
21 11 1
func main()
in cmd/merge/main.go
26 6 0
def normalize_files()
in hack/boilerplate/verify_boilerplate.py
10 6 1
def main()
in hack/boilerplate/verify_boilerplate.py
12 5 0
def get_refs()
in hack/boilerplate/verify_boilerplate.py
12 4 0
def has_ignored_header()
in hack/boilerplate/verify_boilerplate.py
7 4 1
func()
in cmd/merge/main.go
11 3 1
func unmarshal()
in cmd/merge/main.go
11 3 1
def is_generated()
in hack/boilerplate/verify_boilerplate.py
5 3 1
def get_regexs()
in hack/boilerplate/verify_boilerplate.py
8 3 0
func parseKeyValue()
in cmd/merge/main.go
7 2 1
func()
in cmd/merge/main.go
8 2 1
def get_dates()
in hack/boilerplate/verify_boilerplate.py
3 2 0
def nonconforming_lines()
in hack/boilerplate/verify_boilerplate.py
4 2 1
def get_args()
in hack/boilerplate/verify_boilerplate.py
24 1 0
def file_extension()
in hack/boilerplate/verify_boilerplate.py
2 1 1