dart-lang / yaml_edit
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 78 units with 1,020 lines of code in units (82.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (88 lines of code)
    • 13 simple units (294 lines of code)
    • 62 very simple units (638 lines of code)
0% | 0% | 8% | 28% | 62%
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% | 8% | 28% | 62%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src0% | 0% | 8% | 29% | 62%
example0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
YamlNode _traverse()
in lib/src/editor.dart
33 12 3
SourceEdit _removeFromBlockList()
in lib/src/list_mutations.dart
39 11 4
bool isBlockNode()
in lib/src/utils.dart
16 11 1
String yamlEncodeBlockString()
in lib/src/strings.dart
33 10 3
int getIndentation()
in lib/src/utils.dart
22 10 1
void _assertNoChildAlias()
in lib/src/editor.dart
19 9 2
SourceEdit updateInList()
in lib/src/list_mutations.dart
32 9 4
String yamlEncodeBlockScalar()
in lib/src/strings.dart
26 9 3
SourceEdit _removeFromBlockMap()
in lib/src/map_mutations.dart
30 8 4
YamlNode wrapAsYamlNode()
in lib/src/wrap.dart
26 8 3
SourceEdit _addToBlockMap()
in lib/src/map_mutations.dart
35 7 4
bool deepEquals()
in lib/src/equality.dart
11 7 2
int getMapIndentation()
in lib/src/utils.dart
19 7 2
String _yamlEncodeFlowScalar()
in lib/src/strings.dart
17 6 1
bool listDeepEquals()
in lib/src/equality.dart
11 6 2
bool mapDeepEquals()
in lib/src/equality.dart
13 6 2
void update()
in lib/src/editor.dart
33 5 2
YamlNode _deepModify()
in lib/src/editor.dart
23 5 4
SourceEdit _replaceInBlockMap()
in lib/src/map_mutations.dart
19 5 4
void assertValidScalar()
in lib/src/utils.dart
6 5 1