dart-lang / matcher
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 61 units with 858 lines of code in units (53.4% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (152 lines of code)
    • 8 medium size units (228 lines of code)
    • 16 small units (233 lines of code)
    • 35 very small units (245 lines of code)
0% | 17% | 26% | 27% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart0% | 17% | 26% | 27% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src0% | 18% | 24% | 26% | 29%
lib0% | 0% | 51% | 35% | 12%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
_Mismatch? _recursiveMatch()
in lib/src/equals_matcher.dart
78 22 4
String prettyPrint()
in lib/src/pretty_print.dart
74 26 3
Description describeTypedMismatch()
in lib/src/equals_matcher.dart
40 8 4
String? _test()
in lib/src/iterable_matchers.dart
37 11 1
bool matches()
in lib/mirror_matchers.dart
28 9 2
_Mismatch? _compareSets()
in lib/src/equals_matcher.dart
26 6 5
Description describeMismatch()
in lib/src/equals_matcher.dart
26 5 4
Description describeTypedMismatch()
in lib/src/iterable_matchers.dart
24 3 4
_Mismatch? _compareIterables()
in lib/src/equals_matcher.dart
24 8 5
Description describeMismatch()
in lib/src/custom_matcher.dart
23 3 4
bool matches()
in lib/src/custom_matcher.dart
20 5 2
Description describeMismatch()
in lib/mirror_matchers.dart
19 3 4
List _wrapArgs()
in lib/src/operator_matchers.dart
19 8 7
String collapseWhitespace()
in lib/src/string_matchers.dart
17 4 1
Description describeMismatch()
in lib/src/map_matchers.dart
16 2 4
bool _findPairingInner()
in lib/src/iterable_matchers.dart
15 4 4
bool typedMatches()
in lib/src/iterable_matchers.dart
15 4 2
bool matches()
in lib/src/core_matchers.dart
15 6 2
Description describeTypedMismatch()
in lib/src/iterable_matchers.dart
14 2 4
Description addAll()
in lib/src/description.dart
14 3 4