microsoft / typescript-tslint-plugin
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 72 units with 762 lines of code in units (73.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (69 lines of code)
    • 6 simple units (199 lines of code)
    • 65 very simple units (494 lines of code)
0% | 0% | 9% | 26% | 64%
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% | 9% | 26% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 15% | 19% | 64%
src/runner0% | 0% | 0% | 34% | 65%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
69 20 1
public runTsLint()
in src/runner/index.ts
54 10 3
37 8 7
private loadLibrary()
in src/runner/index.ts
29 8 2
private getConfiguration()
in src/runner/index.ts
30 7 4
public setProject()
in src/settings.ts
28 6 2
21 6 3
11 5 1
18 5 3
9 5 1
8 5 1
private getTsLintPaths()
in src/runner/index.ts
15 5 2
16 5 1
13 5 1
public ensureWatching()
in src/configFileWatcher.ts
14 4 1
public decorate()
in src/plugin.ts
33 4 1
9 4 2
26 4 3
11 4 1
12 4 3