dart-lang / intl
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 293 units with 20,418 lines of code in units (59.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 16 medium complex units (532 lines of code)
    • 32 simple units (720 lines of code)
    • 245 very simple units (19,166 lines of code)
0% | 0% | 2% | 3% | 93%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
dart0% | 0% | 2% | 3% | 93%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src/intl0% | 0% | 24% | 19% | 55%
lib/src0% | 0% | 18% | 30% | 51%
lib0% | 0% | <1% | <1% | 98%
lib/src/locale0% | 0% | 0% | 36% | 63%
tool0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void parseField()
in lib/src/intl/date_format_field.dart
66 22 2
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 parseTrunkCharacter()
in lib/src/intl/number_format_parser.dart
68 19 1
PluralCase _br_rule()
in lib/src/plural_rules.dart
18 17 0
PluralCase _pl_rule()
in lib/src/plural_rules.dart
17 17 0
static int numberOfIntegerDigits()
in lib/src/intl/number_format.dart
20 17 1
bool parseCharacterAffix()
in lib/src/intl/number_format_parser.dart
45 17 1
static T pluralLogic()
in lib/intl.dart
41 17 10
PluralCase _ru_rule()
in lib/src/plural_rules.dart
17 16 0
PluralCase _lv_rule()
in lib/src/plural_rules.dart
13 14 0
PluralCase _fil_rule()
in lib/src/plural_rules.dart
8 13 0
DateTime _correctForErrors()
in lib/src/intl/date_builder.dart
38 13 2
PluralCase _sr_rule()
in lib/src/plural_rules.dart
14 12 0
void _formatFixed()
in lib/src/intl/number_format.dart
57 11 1
void checkPrefixes()
in lib/src/intl/number_parser.dart
17 11 1
void _formatPluralOrdinalBlock()
in lib/message_format.dart
54 10 4
PluralCase _be_rule()
in lib/src/plural_rules.dart
14 10 0
26 10 2
void processUExtensions()
in lib/src/locale/locale_parser.dart
37 10 0