dart-lang / path
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 762 lines of code in units (58.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (104 lines of code)
    • 8 medium complex units (254 lines of code)
    • 5 simple units (82 lines of code)
    • 34 very simple units (322 lines of code)
0% | 13% | 33% | 10% | 42%
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
dart0% | 13% | 33% | 10% | 42%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 17% | 37% | 10% | 34%
lib/src/style0% | 0% | 29% | 17% | 53%
benchmark0% | 0% | 0% | 0% | 100%
example0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
104 38 2
String relative()
in lib/src/context.dart
49 24 2
bool _needsNormalization()
in lib/src/context.dart
40 21 1
_PathRelation _isWithinOrEquals()
in lib/src/context.dart
35 21 2
_PathDirection _pathDirection()
in lib/src/context.dart
31 18 2
void normalize()
in lib/src/parsed_path.dart
33 16 1
int rootLength()
in lib/src/style/url.dart
19 14 2
int rootLength()
in lib/src/style/windows.dart
18 12 2
int? _hashFast()
in lib/src/context.dart
29 11 1
String joinAll()
in lib/src/context.dart
30 9 1
String prettyUri()
in lib/src/context.dart
13 7 1
void _validateArgList()
in lib/src/context.dart
17 7 2
String pathFromUri()
in lib/src/style/windows.dart
14 7 1
bool codeUnitsEqual()
in lib/src/style/windows.dart
8 6 2
static Set _create()
in lib/src/path_set.dart
11 5 1
factory Context()
in lib/src/context.dart
16 5 2
Uri absolutePathToUri()
in lib/src/style/windows.dart
19 5 1
bool pathsEqual()
in lib/src/style/windows.dart
10 5 2
static Map _create()
in lib/src/path_map.dart
11 5 1
bool isDriveLetter()
in lib/src/utils.dart
7 5 2