dart-lang / js_facade_gen
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 204 units with 2,227 lines of code in units (41.3% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (139 lines of code)
    • 13 medium complex units (405 lines of code)
    • 18 simple units (468 lines of code)
    • 172 very simple units (1,215 lines of code)
0% | 6% | 18% | 21% | 54%
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
ts0% | 6% | 18% | 21% | 54%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib0% | 8% | 15% | 26% | 50%
lib/json0% | 0% | 49% | 6% | 43%
lib/json/types0% | 0% | 47% | 0% | 52%
lib/json/named_declarations0% | 0% | 0% | 0% | 100%
lib/json/module_declarations0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
139 37 2
31 25 1
export function isKeywordTypeNode()
in lib/json/types/keyword_type.ts
21 15 1
35 14 1
35 14 2
private visitFunctionLike()
in lib/declaration.ts
41 12 2
24 12 1
export function convertNode()
in lib/json/conversions.ts
29 12 1
function convertModifier()
in lib/json/node.ts
30 12 1
merge()
in lib/merge.ts
38 11 1
23 11 1
visitClassBody()
in lib/declaration.ts
40 11 2
export function convertMember()
in lib/json/conversions.ts
29 11 1
visitParameters()
in lib/base.ts
29 11 2
42 9 3
visit()
in lib/main.ts
27 9 1
22 8 2
private translate()
in lib/main.ts
42 8 1
emit()
in lib/main.ts
11 8 1
21 7 1