dart-lang / pub
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 574 units with 10,335 lines of code in units (65.2% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (378 lines of code)
    • 46 medium complex units (2,866 lines of code)
    • 84 simple units (2,437 lines of code)
    • 441 very simple units (4,654 lines of code)
0% | 3% | 27% | 23% | 45%
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% | 3% | 27% | 23% | 45%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/src/command0% | 7% | 36% | 28% | 27%
lib/src0% | 2% | 26% | 22% | 48%
lib/src/solver0% | 6% | 44% | 21% | 26%
lib/src/validator0% | 0% | 11% | 35% | 53%
lib/src/source0% | 0% | 10% | 8% | 80%
lib/src/authentication0% | 0% | 23% | 18% | 58%
tool0% | 0% | 0% | 67% | 32%
tool/test-bin0% | 0% | 0% | 0% | 100%
lib/src/sdk0% | 0% | 0% | 0% | 100%
lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Future _outputHuman()
in lib/src/command/outdated.dart
151 43 13
138 39 2
Future _reportPackage()
in lib/src/solver/report.dart
89 32 3
String toString()
in lib/src/solver/incompatibility.dart
100 24 1
Uri relativizeUri()
in lib/src/packages_file.dart
52 24 2
void _visit()
in lib/src/solver/failure.dart
116 23 3
Future runProtected()
in lib/src/command/deps.dart
96 22 0
Uri _relativize()
in lib/src/packages_file.dart
49 22 2
Map parse()
in lib/src/packages_file.dart
65 20 3
void _updateBinStubs()
in lib/src/global_packages.dart
69 20 5
String? _tryRequiresForbidden()
in lib/src/solver/incompatibility.dart
67 19 4
_ParseResult _parsePackage()
in lib/src/command/add.dart
107 19 2
Future nullSafetyComplianceOfPackages()
in lib/src/null_safety_analysis.dart
100 18 2
String? _tryRequiresThrough()
in lib/src/solver/incompatibility.dart
62 18 4
int _chooseExitCode()
in lib/src/command.dart
28 18 1
static List listFiles()
in lib/src/ignore.dart
61 18 2
Future send()
in lib/src/http.dart
42 18 1
Future acquireDependencies()
in lib/src/entrypoint.dart
78 17 8
void assertUpToDate()
in lib/src/entrypoint.dart
57 17 0
Future runProtected()
in lib/src/command/global_activate.dart
77 17 0