dart-lang / mockito
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 89 units with 1,638 lines of code in units (70.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (364 lines of code)
    • 16 simple units (472 lines of code)
    • 66 very simple units (802 lines of code)
0% | 0% | 22% | 28% | 48%
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% | 22% | 28% | 48%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 0% | 24% | 31% | 43%
example0% | 0% | 0% | 0% | 100%
example/iss0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
72 22 2
Expression _dummyValue()
in lib/src/builder.dart
56 18 1
void _addTypesFromConstant()
in lib/src/builder.dart
35 16 1
void _buildOverridingMethod()
in lib/src/builder.dart
61 16 2
void _addType()
in lib/src/builder.dart
35 13 1
List _checkFunction()
in lib/src/builder.dart
53 13 5
Reference _typeReference()
in lib/src/builder.dart
52 13 2
56 10 2
Iterable methodOverrides()
in lib/src/builder.dart
22 10 1
bool _isArgumentsMatches()
in lib/src/mock.dart
32 9 1
String toPrettyString()
in lib/src/mock.dart
35 9 0
Class _buildMockClass()
in lib/src/builder.dart
50 8 0
Iterable fieldOverrides()
in lib/src/builder.dart
20 8 1
bool equals()
in lib/src/invocation_matcher.dart
15 7 2
Expression _dummyFunctionValue()
in lib/src/builder.dart
26 7 1
void _captureArguments()
in lib/src/mock.dart
17 7 1
void _checkWith()
in lib/src/mock.dart
21 7 1
static Description _describeInvocation()
in lib/src/invocation_matcher.dart
20 6 2
factory _MockTargetGatherer()
in lib/src/builder.dart
19 6 2
void _checkClassesToMockAreValid()
in lib/src/builder.dart
44 6 0