dart-lang / string_scanner
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 37 units with 310 lines of code in units (52.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (67 lines of code)
    • 5 small units (63 lines of code)
    • 29 very small units (180 lines of code)
0% | 0% | 21% | 20% | 58%
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% | 21% | 20% | 58%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src0% | 0% | 22% | 17% | 60%
example0% | 0% | 0% | 81% | 18%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
set position()
in lib/src/line_scanner.dart
23 5 1
set position()
in lib/src/eager_span_scanner.dart
23 5 1
void validateErrorArgs()
in lib/src/utils.dart
21 12 4
void expect()
in lib/src/string_scanner.dart
14 4 2
void expectChar()
in lib/src/string_scanner.dart
13 5 2
num parseNumber()
in example/example.dart
13 3 1
bool scan()
in lib/src/eager_span_scanner.dart
12 3 1
bool scan()
in lib/src/line_scanner.dart
11 3 1
bool matches()
in lib/src/relative_span_scanner.dart
9 2 1
Never error()
in lib/src/relative_span_scanner.dart
9 6 4
set state()
in lib/src/line_scanner.dart
9 2 1
Never error()
in lib/src/string_scanner.dart
9 6 4
set state()
in lib/src/eager_span_scanner.dart
9 3 1
void _adjustLineAndColumn()
in lib/src/line_scanner.dart
8 4 1
bool matches()
in lib/src/span_scanner.dart
8 2 1
Never error()
in lib/src/span_scanner.dart
8 6 4
bool scan()
in lib/src/string_scanner.dart
8 2 1
void _adjustLineAndColumn()
in lib/src/eager_span_scanner.dart
8 4 1
set state()
in lib/src/relative_span_scanner.dart
7 3 1
set state()
in lib/src/span_scanner.dart
7 3 1