dart-lang / source_maps
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 47 units with 498 lines of code in units (53.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 10 simple units (232 lines of code)
    • 37 very simple units (266 lines of code)
0% | 0% | 0% | 46% | 53%
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% | 0% | 0% | 46% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib0% | 0% | 0% | 44% | 55%
lib/src0% | 0% | 0% | 64% | 35%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void add()
in lib/printer.dart
15 10 4
Map toJson()
in lib/parser.dart
46 10 1
void add()
in lib/printer.dart
28 9 2
void addLine()
in lib/printer.dart
14 8 3
void writeTo()
in lib/printer.dart
18 7 1
String guessIndent()
in lib/refactor.dart
19 7 2
SourceMapSpan? spanFor()
in lib/parser.dart
33 7 4
int decodeVlq()
in lib/src/vlq.dart
25 6 1
int binarySearch()
in lib/src/utils.dart
16 6 2
Mapping parseJson()
in lib/parser.dart
18 6 3
void mark()
in lib/printer.dart
13 5 1
NestedPrinter commit()
in lib/refactor.dart
34 5 0
Iterable encodeVlq()
in lib/src/vlq.dart
21 5 1
int _indexFor()
in lib/parser.dart
7 5 2
TargetEntry? _findColumn()
in lib/parser.dart
7 5 3
SourceMapSpan? spanFor()
in lib/parser.dart
21 4 4
String toString()
in lib/parser.dart
16 4 0
void addSpan()
in lib/builder.dart
5 3 3
int compareTo()
in lib/builder.dart
9 3 1
void addSpaces()
in lib/printer.dart
6 2 1