dart-lang / args
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 58 units with 843 lines of code in units (66.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (191 lines of code)
    • 11 simple units (279 lines of code)
    • 42 very simple units (373 lines of code)
0% | 0% | 22% | 33% | 44%
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% | 22% | 33% | 44%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 0% | 17% | 32% | 49%
lib0% | 0% | 42% | 35% | 21%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
List wrapTextAsLines()
in lib/src/utils.dart
44 23 3
ArgResults parse()
in lib/src/parser.dart
46 13 0
int _editDistance()
in lib/command_runner.dart
26 12 2
Future runCommand()
in lib/command_runner.dart
46 11 1
void _writeOption()
in lib/src/usage.dart
29 11 1
void _write()
in lib/src/usage.dart
20 9 2
bool _parseLongOption()
in lib/src/parser.dart
14 9 0
bool _parseAbbreviation()
in lib/src/parser.dart
14 8 1
String _similarCommandsText()
in lib/command_runner.dart
24 7 2
String _getCommandUsage()
in lib/command_runner.dart
36 7 3
void _addOption()
in lib/src/arg_parser.dart
43 7 14
Null run()
in lib/src/help_command.dart
26 6 0
String wrapText()
in lib/src/utils.dart
33 6 3
List _calculateColumnWidths()
in lib/src/usage.dart
18 6 0
void _writeLine()
in lib/src/usage.dart
21 6 2
bool _handleLongOption()
in lib/src/parser.dart
30 6 2
String _buildAllowedList()
in lib/src/usage.dart
18 5 1
ArgResults parse()
in lib/command_runner.dart
12 4 1
String generate()
in lib/src/usage.dart
12 4 0
bool _parseSoloOption()
in lib/src/parser.dart
7 4 0