dart-lang / pana
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 172 units with 3,817 lines of code in units (62.4% of code).
    • 3 very long units (578 lines of code)
    • 11 long units (760 lines of code)
    • 44 medium size units (1,373 lines of code)
    • 49 small units (710 lines of code)
    • 65 very small units (396 lines of code)
15% | 19% | 35% | 18% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart15% | 19% | 35% | 18% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/src/report50% | 23% | 10% | 10% | 3%
lib/src6% | 18% | 34% | 27% | 13%
lib/src/tag0% | 31% | 47% | 7% | 14%
lib/src/license_detection0% | 17% | 53% | 17% | 10%
lib/src/batch0% | 0% | 72% | 18% | 8%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Future followsTemplate()
in lib/src/report/template.dart
275 34 1
Future trustworthyDependency()
in lib/src/report/dependencies.dart
201 30 1
Future _inspect()
in lib/src/package_analyzer.dart
102 18 2
Future multiPlatform()
in lib/src/report/multi_platform.dart
99 13 2
Future runProc()
in lib/src/utils.dart
81 6 6
List _buildDeps()
in lib/src/pkg_resolution.dart
80 19 3
void nullSafetyTags()
in lib/src/tag/tagger.dart
77 15 2
List fuseMatchedRanges()
in lib/src/license_detection/token_matcher.dart
74 19 5
Future nullSafety()
in lib/src/report/null_safety.dart
70 4 2
void platformTags()
in lib/src/tag/tagger.dart
65 7 4
Future runAnalyzer()
in lib/src/sdk_env.dart
59 8 5
static Future create()
in lib/src/sdk_env.dart
52 5 6
List detectRuns()
in lib/src/license_detection/token_matcher.dart
52 13 5
Future _analyzePackage()
in lib/src/report/static_analysis.dart
51 2 1
Future dartdoc()
in lib/src/sdk_env.dart
49 8 9
factory Tagger()
in lib/src/tag/tagger.dart
47 7 1
Future staticAnalysis()
in lib/src/report/static_analysis.dart
45 10 1
Future run()
in lib/src/batch/batch_compare_command.dart
44 5 0
void runtimeTags()
in lib/src/tag/tagger.dart
41 8 2
List getTargetMatchedRanges()
in lib/src/license_detection/token_matcher.dart
41 8 3