dart-lang / markdown
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 114 units with 2,062 lines of code in units (39.6% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (165 lines of code)
    • 8 medium complex units (424 lines of code)
    • 21 simple units (597 lines of code)
    • 83 very simple units (876 lines of code)
0% | 8% | 20% | 28% | 42%
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% | 8% | 20% | 28% | 42%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 11% | 25% | 23% | 39%
tool0% | 0% | 10% | 46% | 42%
benchmark0% | 0% | 0% | 58% | 41%
example0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
String escapeAttribute()
in lib/src/util.dart
61 37 1
Node parse()
in lib/src/block_parser.dart
104 30 1
void _processEmphasis()
in lib/src/inline_parser.dart
68 21 1
66 21 1
InlineLink? _parseInlineBracketedLink()
in lib/src/inline_parser.dart
45 18 1
String? _parseTitle()
in lib/src/inline_parser.dart
37 15 1
bool onMatch()
in lib/src/inline_parser.dart
50 14 2
Future _processConfig()
in tool/stats.dart
51 14 6
static DelimiterRun? tryParse()
in lib/src/inline_parser.dart
56 13 6
Element _parseRow()
in lib/src/block_parser.dart
51 12 3
String? _parseReferenceLinkLabel()
in lib/src/inline_parser.dart
28 10 1
List? _extractReflinkDefinitions()
in lib/src/block_parser.dart
45 10 2
CompareResult compareResult()
in tool/stats_lib.dart
33 10 5
bool _compareHtml()
in tool/stats_lib.dart
39 10 2
Future main()
in tool/stats.dart
55 10 1
void _linkOrImage()
in lib/src/inline_parser.dart
46 9 0
Node? parse()
in lib/src/block_parser.dart
33 9 1
List _parseAlignments()
in lib/src/block_parser.dart
22 9 1
void _combineAdjacentText()
in lib/src/inline_parser.dart
20 8 1
Node? close()
in lib/src/inline_parser.dart
35 8 4