dart-lang / matcher
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 61 units with 858 lines of code in units (53.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (74 lines of code)
    • 2 medium complex units (115 lines of code)
    • 6 simple units (152 lines of code)
    • 52 very simple units (517 lines of code)
0% | 8% | 13% | 17% | 60%
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% | 8% | 13% | 17% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 9% | 14% | 15% | 61%
lib0% | 0% | 0% | 51% | 48%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
String prettyPrint()
in lib/src/pretty_print.dart
74 26 3
_Mismatch? _recursiveMatch()
in lib/src/equals_matcher.dart
78 22 4
String? _test()
in lib/src/iterable_matchers.dart
37 11 1
bool matches()
in lib/mirror_matchers.dart
28 9 2
Description describeTypedMismatch()
in lib/src/equals_matcher.dart
40 8 4
_Mismatch? _compareIterables()
in lib/src/equals_matcher.dart
24 8 5
List _wrapArgs()
in lib/src/operator_matchers.dart
19 8 7
_Mismatch? _compareSets()
in lib/src/equals_matcher.dart
26 6 5
bool matches()
in lib/src/core_matchers.dart
15 6 2
bool typedMatches()
in lib/src/numeric_matchers.dart
12 5 2
String _typeName()
in lib/src/pretty_print.dart
7 5 1
Description describeMismatch()
in lib/src/equals_matcher.dart
26 5 4
bool matches()
in lib/src/custom_matcher.dart
20 5 2
bool _findPairingInner()
in lib/src/iterable_matchers.dart
15 4 4
bool typedMatches()
in lib/src/iterable_matchers.dart
15 4 2
String? _test()
in lib/src/iterable_matchers.dart
13 4 2
Matcher wrapMatcher()
in lib/src/util.dart
11 4 1
Description describeMismatch()
in lib/src/core_matchers.dart
9 4 4
Matcher isIn()
in lib/src/core_matchers.dart
11 4 1
String collapseWhitespace()
in lib/src/string_matchers.dart
17 4 1