angular / angular-cli
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 1,454 units with 21,402 lines of code in units (44.5% of code).
    • 2 very complex units (544 lines of code)
    • 12 complex units (1,329 lines of code)
    • 70 medium complex units (4,328 lines of code)
    • 167 simple units (4,965 lines of code)
    • 1,203 very simple units (10,236 lines of code)
2% | 6% | 20% | 23% | 47%
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
ts2% | 6% | 20% | 23% | 47%
js0% | 0% | 0% | 35% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/angular7% | 12% | 23% | 27% | 28%
packages/angular_devkit1% | 5% | 17% | 19% | 55%
packages/schematics0% | 0% | 30% | 26% | 42%
scripts0% | 0% | 6% | 34% | 59%
lib0% | 0% | 68% | 0% | 31%
tools0% | 0% | 0% | 26% | 73%
packages0% | 0% | 0% | 100% | 0%
goldens/public-api0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async run()
in packages/angular/cli/commands/update-impl.ts
382 102 1
function create()
in packages/angular_devkit/core/src/workspace/json/utilities.ts
162 56 4
function visitor()
in packages/angular/cli/utilities/json-schema.ts
116 48 3
public override async initialize()
in packages/angular/cli/models/architect-command.ts
154 44 1
async run()
in packages/angular/cli/commands/add-impl.ts
167 40 1
function updateJsonWorkspace()
in packages/angular_devkit/core/src/workspace/json/writer.ts
130 39 1
function _readNumber()
in packages/angular_devkit/core/src/json/parser.ts
74 35 2
export async function augmentIndexHtml()
in packages/angular_devkit/build_angular/src/utils/index-file/augment-index-html.ts
113 32 1
export function addUndefinedDefaults()
in packages/angular_devkit/core/src/json/schema/transforms.ts
72 31 3
async function setup()
in packages/angular_devkit/build_angular/src/builders/dev-server/index.ts
127 29 0
protected async runSchematic()
in packages/angular/cli/models/schematic-command.ts
117 29 1
function _readValue()
in packages/angular_devkit/core/src/json/parser.ts
63 27 2
usePromptProvider()
in packages/angular_devkit/core/src/json/schema/registry.ts
104 27 1
export function parseArguments()
in packages/angular/cli/models/parser.ts
92 26 3
function _readString()
in packages/angular_devkit/core/src/json/parser.ts
71 25 2
export async function inlineLocales()
in packages/angular_devkit/build_angular/src/utils/process-bundle.ts
77 25 1
async customOptions()
in packages/angular_devkit/build_angular/src/babel/webpack-loader.ts
82 25 3
export async function main()
in packages/angular_devkit/benchmark/src/main.ts
147 25 4
async function inlineLocalesDirect()
in packages/angular_devkit/build_angular/src/utils/process-bundle.ts
74 24 2
VariableDeclaration()
in packages/angular_devkit/build_angular/src/babel/plugins/adjust-typescript-enums.ts
99 24 2