dart-lang / intl_translation
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 78 units with 1,046 lines of code in units (63.2% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (230 lines of code)
    • 8 medium size units (222 lines of code)
    • 25 small units (351 lines of code)
    • 42 very small units (243 lines of code)
0% | 21% | 21% | 33% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart0% | 21% | 21% | 33% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib0% | 22% | 24% | 31% | 21%
lib/src0% | 20% | 16% | 36% | 26%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static _notInlinedMessages()
in lib/generate_localized.dart
92 10 1
String checkValidity()
in lib/src/intl_message.dart
84 26 6
Message messageFromMethodInvocation()
in lib/extract_messages.dart
54 8 1
String evaluateJsonTemplate()
in lib/generate_localized.dart
48 9 2
MainMessage _messageFromNode()
in lib/extract_messages.dart
35 9 3
String _validateMessage()
in lib/extract_messages.dart
27 6 1
void writeTranslations()
in lib/generate_localized.dart
24 3 2
MainMessage messageFromIntlMessageCall()
in lib/extract_messages.dart
23 2 1
List findMessages()
in lib/src/message_rewriter.dart
22 3 3
String toOriginalCode()
in lib/src/intl_message.dart
22 7 2
bool checkArgs()
in lib/src/intl_message.dart
21 5 2
String rewriteMessages()
in lib/src/message_rewriter.dart
20 4 3
String contentForLocale()
in lib/generate_localized.dart
19 4 2
String turnInterpolationIntoICUForm()
in lib/src/arb_generation.dart
19 8 3
void writeTranslations()
in lib/generate_localized.dart
17 2 2
String escapeAndValidateString()
in lib/src/intl_message.dart
17 1 1
bool addIntlMessage()
in lib/extract_messages.dart
16 4 1
Map toARB()
in lib/src/arb_generation.dart
16 4 4
Future initializeMessages()
in lib/generate_localized.dart
14 3 1
Map parseContent()
in lib/extract_messages.dart
14 2 3