cdklabs / jsii-docgen
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 251 units with 2,480 lines of code in units (77.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (73 lines of code)
    • 9 simple units (302 lines of code)
    • 240 very simple units (2,105 lines of code)
0% | 0% | 2% | 12% | 84%
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% | 0% | 2% | 12% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/docgen/transpile0% | 0% | 3% | 7% | 88%
src/docgen/view0% | 0% | 5% | 7% | 86%
src/docgen/render0% | 0% | 0% | 22% | 77%
src/docgen0% | 0% | 0% | 56% | 43%
src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function assertSuccess()
in src/docgen/view/_npm.ts
28 13 1
public typeReference()
in src/docgen/transpile/transpile.ts
45 12 1
public toJson()
in src/docgen/transpile/transpile.ts
52 10 0
public async toJson()
in src/docgen/view/documentation.ts
43 10 1
export function extractDocs()
in src/docgen/schema.ts
18 9 1
public static fromString()
in src/docgen/transpile/transpile.ts
18 9 1
public visitProperty()
in src/docgen/render/markdown-render.ts
45 7 1
public toString()
in src/docgen/transpile/transpile.ts
26 7 1
public visitInterface()
in src/docgen/render/markdown-render.ts
35 6 1
public visitParameter()
in src/docgen/render/markdown-render.ts
40 6 1
public render()
in src/docgen/render/markdown-doc.ts
25 6 1
public visitClass()
in src/docgen/render/markdown-render.ts
32 5 1
function isJsiiType()
in src/docgen/render/markdown-render.ts
9 5 1
public docs()
in src/docgen/render/markdown-doc.ts
15 5 1
private formatHeader()
in src/docgen/render/markdown-doc.ts
16 5 0
public type()
in src/docgen/transpile/java.ts
27 5 1
submodulePath: submodulePath()
in src/docgen/transpile/csharp.ts
19 5 1
public callable()
in src/docgen/transpile/csharp.ts
22 5 1
private formatProperty()
in src/docgen/transpile/csharp.ts
13 5 3
protected findSubmodule()
in src/docgen/transpile/transpile.ts
21 5 1