dart-lang / io
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 27 units with 358 lines of code in units (49.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (70 lines of code)
    • 4 medium size units (107 lines of code)
    • 7 small units (104 lines of code)
    • 15 very small units (77 lines of code)
0% | 19% | 29% | 29% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart0% | 19% | 29% | 29% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src0% | 21% | 32% | 28% | 17%
example0% | 0% | 0% | 39% | 60%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
List shellSplit()
in lib/src/shell_words.dart
70 23 1
String? wrapWith()
in lib/src/ansi_code.dart
35 10 3
factory _ForwardingSpawn()
in lib/src/process_manager.dart
26 1 4
Future spawnBackground()
in lib/src/process_manager.dart
25 1 8
void Function()
in lib/src/shared_stdin.dart
21 3 1
Future spawn()
in lib/src/process_manager.dart
20 1 8
Future copyPath()
in lib/src/copy_path.dart
16 6 2
void copyPathSync()
in lib/src/copy_path.dart
16 6 2
factory ProcessManager()
in lib/src/process_manager.dart
15 2 5
Future main()
in example/spawn_process_example.dart
13 1 0
int _permissionBitIndex()
in lib/src/permissions.dart
12 4 2
FutureOr isExecutable()
in lib/src/permissions.dart
12 3 3
void main()
in example/example.dart
10 2 1
void _preview()
in example/example.dart
10 2 3
Future spawnDetached()
in lib/src/process_manager.dart
9 1 8
bool _doNothing()
in lib/src/copy_path.dart
9 3 2
bool _hasPermission()
in lib/src/permissions.dart
8 1 4
Future terminate()
in lib/src/shared_stdin.dart
8 2 0
void _checkUnmatchedQuote()
in lib/src/shell_words.dart
7 3 2
void _onClosed()
in lib/src/process_manager.dart
6 1 0