apple / swift-installer-scripts
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 14 units with 214 lines of code in units (8.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (73 lines of code)
    • 1 simple units (57 lines of code)
    • 12 very simple units (84 lines of code)
0% | 0% | 34% | 26% | 39%
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
cc0% | 0% | 36% | 28% | 35%
hh0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Windows/CustomActions/SwiftInstaller/Sources0% | 0% | 36% | 28% | 35%
Windows/CustomActions/SwiftInstaller/Headers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 14 most complex units
Unit# linesMcCabe index# params
std::vector available_toolsets()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
73 21 0
UINT SwiftInstaller_InstallAuxiliaryFiles()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
57 8 1
std::string to_string()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/logging.cc
9 5 1
std::filesystem::path install_root()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
16 4 0
std::vector available_versions()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
23 4 0
std::string contents()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
8 2 1
std::string str()
in platforms/Windows/CustomActions/SwiftInstaller/Headers/logging.hh
1 1 0
severity severity()
in platforms/Windows/CustomActions/SwiftInstaller/Headers/logging.hh
1 1 0
explicit hkey()
in platforms/Windows/CustomActions/SwiftInstaller/Headers/scoped_raii.hh
1 1 1
explicit com_initializer()
in platforms/Windows/CustomActions/SwiftInstaller/Headers/scoped_raii.hh
4 1 0
explicit com_initializer()
in platforms/Windows/CustomActions/SwiftInstaller/Headers/scoped_raii.hh
4 1 1
bool succeeded()
in platforms/Windows/CustomActions/SwiftInstaller/Headers/scoped_raii.hh
1 1 0
void trim()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
5 1 1
std::wstring get_property()
in platforms/Windows/CustomActions/SwiftInstaller/Sources/swift_installer.cc
11 1 2