dart-lang / args
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 58 units with 843 lines of code in units (66.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 16 medium size units (499 lines of code)
    • 14 small units (208 lines of code)
    • 28 very small units (136 lines of code)
0% | 0% | 59% | 24% | 16%
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% | 59% | 24% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src0% | 0% | 54% | 29% | 16%
lib0% | 0% | 78% | 7% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Future runCommand()
in lib/command_runner.dart
46 11 1
ArgResults parse()
in lib/src/parser.dart
46 13 0
List wrapTextAsLines()
in lib/src/utils.dart
44 23 3
void _addOption()
in lib/src/arg_parser.dart
43 7 14
String _getCommandUsage()
in lib/command_runner.dart
36 7 3
String wrapText()
in lib/src/utils.dart
33 6 3
bool _handleLongOption()
in lib/src/parser.dart
30 6 2
void _writeOption()
in lib/src/usage.dart
29 11 1
int _editDistance()
in lib/command_runner.dart
26 12 2
Null run()
in lib/src/help_command.dart
26 6 0
void addMultiOption()
in lib/src/arg_parser.dart
25 2 8
bool _handleAbbreviation()
in lib/src/parser.dart
25 4 3
String _similarCommandsText()
in lib/command_runner.dart
24 7 2
Option newOption()
in lib/src/option.dart
23 1 14
void addFlag()
in lib/src/arg_parser.dart
22 2 6
void _writeLine()
in lib/src/usage.dart
21 6 2
void _write()
in lib/src/usage.dart
20 9 2
List _calculateColumnWidths()
in lib/src/usage.dart
18 6 0
String _buildAllowedList()
in lib/src/usage.dart
18 5 1
void _setOption()
in lib/src/parser.dart
18 4 3