dart-lang / test_descriptor
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 17 units with 183 lines of code in units (40.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (62 lines of code)
    • 4 small units (54 lines of code)
    • 11 very small units (67 lines of code)
0% | 0% | 33% | 29% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart0% | 0% | 33% | 29% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src0% | 0% | 33% | 29% | 36%
Alternative Visuals
Longest Units
Top 17 longest units
Unit# linesMcCabe index# params
Future validate()
in lib/src/pattern_descriptor.dart
36 6 1
String _textMismatchMessage()
in lib/src/file_descriptor.dart
26 5 3
String describeDirectory()
in lib/src/utils.dart
16 3 2
String prefixLines()
in lib/src/utils.dart
14 3 5
return DirectoryDescriptor()
in lib/src/directory_descriptor.dart
13 4 2
Future validate()
in lib/src/nothing_descriptor.dart
11 4 1
String prettyPath()
in lib/src/utils.dart
9 4 1
factory FileDescriptor()
in lib/src/file_descriptor.dart
8 4 2
Future create()
in lib/src/file_descriptor.dart
8 1 1
Future validate()
in lib/src/file_descriptor.dart
8 2 1
Future _validate()
in lib/src/file_descriptor.dart
8 3 2
Future validate()
in lib/src/directory_descriptor.dart
8 2 1
void _validate()
in lib/src/file_descriptor.dart
5 2 2
Future create()
in lib/src/directory_descriptor.dart
5 1 1
Future _validate()
in lib/src/file_descriptor.dart
4 2 2
Future create()
in lib/src/pattern_descriptor.dart
3 1 1
Future create()
in lib/src/nothing_descriptor.dart
1 1 1