dart-lang / intl
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 293 units with 20,418 lines of code in units (59.3% of code).
    • 1 very long units (17,207 lines of code)
    • 5 long units (306 lines of code)
    • 22 medium size units (756 lines of code)
    • 75 small units (1,129 lines of code)
    • 190 very small units (1,020 lines of code)
84% | 1% | 3% | 5% | 4%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart84% | 1% | 3% | 5% | 4%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib95% | <1% | 2% | 1% | <1%
lib/src/intl0% | 15% | 17% | 34% | 32%
lib/src/locale0% | 0% | 29% | 25% | 44%
tool0% | 0% | 43% | 0% | 56%
lib/src0% | 0% | 0% | 53% | 46%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Map dateTimeSymbolMap()
in lib/date_symbol_data_local.dart
17207 1 0
bool parseTrunkCharacter()
in lib/src/intl/number_format_parser.dart
68 19 1
void parseField()
in lib/src/intl/date_format_field.dart
66 22 2
factory _CompactNumberFormat()
in lib/src/intl/compact_number_format.dart
61 7 5
void _formatFixed()
in lib/src/intl/number_format.dart
57 11 1
void _formatPluralOrdinalBlock()
in lib/message_format.dart
54 10 4
String _parseTrunk()
in lib/src/intl/number_format_parser.dart
47 21 0
String formatField()
in lib/src/intl/date_format_field.dart
46 21 1
bool parseCharacterAffix()
in lib/src/intl/number_format_parser.dart
45 17 1
void processTExtensions()
in lib/src/locale/locale_parser.dart
43 10 0
Queue _extractParts()
in lib/message_format.dart
41 7 1
Map _parsePluralBlock()
in lib/message_format.dart
41 4 1
static T pluralLogic()
in lib/intl.dart
41 17 10
Queue _parseBlock()
in lib/message_format.dart
38 8 1
DateTime _correctForErrors()
in lib/src/intl/date_builder.dart
38 13 2
void _formatBlock()
in lib/message_format.dart
37 7 4
void processUExtensions()
in lib/src/locale/locale_parser.dart
37 10 0
Map _parseOrdinalBlock()
in lib/message_format.dart
34 3 1
DateTime asDate()
in lib/src/intl/date_builder.dart
33 8 1
Map _parseSelectBlock()
in lib/message_format.dart
31 3 1