dart-lang / yaml_edit
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,020 lines of code in units (82.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 13 medium size units (382 lines of code)
    • 32 small units (454 lines of code)
    • 33 very small units (184 lines of code)
0% | 0% | 37% | 44% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart0% | 0% | 37% | 44% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src0% | 0% | 37% | 44% | 17%
example0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
SourceEdit _removeFromBlockList()
in lib/src/list_mutations.dart
39 11 4
SourceEdit _addToBlockMap()
in lib/src/map_mutations.dart
35 7 4
void update()
in lib/src/editor.dart
33 5 2
YamlNode _traverse()
in lib/src/editor.dart
33 12 3
String yamlEncodeBlockString()
in lib/src/strings.dart
33 10 3
SourceEdit updateInList()
in lib/src/list_mutations.dart
32 9 4
SourceEdit _removeFromBlockMap()
in lib/src/map_mutations.dart
30 8 4
YamlNode remove()
in lib/src/editor.dart
27 4 1
YamlNode wrapAsYamlNode()
in lib/src/wrap.dart
26 8 3
String yamlEncodeBlockScalar()
in lib/src/strings.dart
26 9 3
void _performEdit()
in lib/src/editor.dart
23 2 3
YamlNode _deepModify()
in lib/src/editor.dart
23 5 4
int getIndentation()
in lib/src/utils.dart
22 10 1
void _initialize()
in lib/src/editor.dart
19 4 0
void _assertNoChildAlias()
in lib/src/editor.dart
19 9 2
SourceEdit _removeFromFlowList()
in lib/src/list_mutations.dart
19 3 4
SourceEdit _replaceInBlockMap()
in lib/src/map_mutations.dart
19 5 4
int getMapIndentation()
in lib/src/utils.dart
19 7 2
SourceEdit updateInMap()
in lib/src/map_mutations.dart
17 4 4
SourceEdit _removeFromFlowMap()
in lib/src/map_mutations.dart
17 3 4