kubernetes / system-validators
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 48 units with 727 lines of code in units (70.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (99 lines of code)
    • 10 simple units (293 lines of code)
    • 36 very simple units (335 lines of code)
0% | 0% | 13% | 40% | 46%
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
go0% | 0% | 13% | 40% | 46%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
validators0% | 0% | 15% | 40% | 43%
hack0% | 0% | 0% | 40% | 60%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in validators/kernel_validator.go
64 17 1
func toSemVer()
in validators/package_validator_linux.go
35 11 1
func verifyBoilerplate()
in hack/verify-boilerplate.go
38 10 1
func()
in validators/kernel_validator.go
48 9 1
func()
in validators/docker_validator.go
37 8 1
func toSemVerRange()
in validators/package_validator_linux.go
21 8 1
func applyPackageSpecOverride()
in validators/package_validator_linux.go
23 7 3
func()
in validators/kernel_validator.go
18 7 1
func()
in validators/cgroup_validator_linux.go
32 7 1
func()
in validators/cgroup_validator_linux.go
22 7 1
func()
in validators/package_validator_linux.go
31 6 1
func()
in validators/cgroup_validator_linux.go
23 6 1
func()
in validators/docker_validator.go
22 5 1
func()
in validators/package_validator_linux.go
18 5 1
func getOSDistro()
in validators/package_validator_linux.go
18 5 0
func()
in validators/report.go
18 5 1
func main()
in hack/verify-boilerplate.go
17 5 0
func()
in validators/kernel_validator.go
17 4 1
func Validate()
in validators/validators.go
15 4 2
func trimLeadingComment()
in hack/verify-boilerplate.go
13 4 2