dart-lang / string_scanner
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 37 units with 310 lines of code in units (52.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (21 lines of code)
    • 3 simple units (26 lines of code)
    • 33 very simple units (263 lines of code)
0% | 0% | 6% | 8% | 84%
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% | 6% | 8% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 0% | 7% | 8% | 84%
example0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void validateErrorArgs()
in lib/src/utils.dart
21 12 4
Never error()
in lib/src/relative_span_scanner.dart
9 6 4
Never error()
in lib/src/span_scanner.dart
8 6 4
Never error()
in lib/src/string_scanner.dart
9 6 4
set position()
in lib/src/line_scanner.dart
23 5 1
void expectChar()
in lib/src/string_scanner.dart
13 5 2
set position()
in lib/src/eager_span_scanner.dart
23 5 1
void _adjustLineAndColumn()
in lib/src/line_scanner.dart
8 4 1
void expect()
in lib/src/string_scanner.dart
14 4 2
void _adjustLineAndColumn()
in lib/src/eager_span_scanner.dart
8 4 1
set state()
in lib/src/relative_span_scanner.dart
7 3 1
bool scan()
in lib/src/line_scanner.dart
11 3 1
set state()
in lib/src/span_scanner.dart
7 3 1
set position()
in lib/src/string_scanner.dart
7 3 1
bool scanChar()
in lib/src/string_scanner.dart
6 3 1
set state()
in lib/src/eager_span_scanner.dart
9 3 1
bool scan()
in lib/src/eager_span_scanner.dart
12 3 1
num parseNumber()
in example/example.dart
13 3 1
FileSpan spanFrom()
in lib/src/relative_span_scanner.dart
5 2 2
bool matches()
in lib/src/relative_span_scanner.dart
9 2 1