bottlerocket-os / bottlerocket-sdk
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 15 units with 382 lines of code in units (36.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (119 lines of code)
    • 1 simple units (78 lines of code)
    • 13 very simple units (185 lines of code)
0% | 0% | 31% | 20% | 48%
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
rs0% | 0% | 31% | 20% | 48%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
license-scan/src0% | 0% | 38% | 25% | 36%
license-tool/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 15 most complex units
Unit# linesMcCabe index# params
fn write_attribution()
in license-scan/src/main.rs
119 19 6
fn main()
in license-scan/src/main.rs
78 10 0
fn copy_files()
in license-scan/src/main.rs
17 4 3
fn scan_go_vendor_repos()
in license-scan/src/main.rs
34 4 1
fn get()
in license-scan/src/main.rs
27 3 3
fn get_license_destinations()
in license-tool/src/main.rs
14 2 2
fn expression_from_str()
in license-scan/src/main.rs
19 2 1
fn non_license()
in license-scan/src/main.rs
6 2 1
fn print_spdx_id()
in license-tool/src/main.rs
12 1 2
fn print_paths()
in license-tool/src/main.rs
19 1 3
fn parse_licenses_file()
in license-tool/src/main.rs
9 1 1
fn test_parse_toml_file()
in license-tool/src/main.rs
6 1 0
fn test_use_path()
in license-tool/src/main.rs
11 1 0
fn unslash()
in license-scan/src/main.rs
3 1 1
fn hash()
in license-scan/src/main.rs
8 1 1