angular / components
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 5,075 units with 38,201 lines of code in units (28.3% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (78 lines of code)
    • 54 medium complex units (2,508 lines of code)
    • 268 simple units (5,789 lines of code)
    • 4,752 very simple units (29,826 lines of code)
0% | <1% | 6% | 15% | 78%
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% | <1% | 6% | 15% | 78%
js0% | 0% | 0% | 24% | 75%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/google-maps0% | 4% | 2% | 3% | 89%
src/cdk0% | 0% | 8% | 22% | 69%
src/material0% | 0% | 4% | 15% | 80%
src/cdk-experimental0% | 0% | 9% | 11% | 78%
tools/tslint-rules0% | 0% | 21% | 27% | 50%
tools/stylelint0% | 0% | 71% | 13% | 14%
tools/example-module0% | 0% | 66% | 0% | 33%
tools/dgeni0% | 0% | 12% | 32% | 54%
tools/region-parser0% | 0% | 64% | 0% | 35%
src/youtube-player0% | 0% | 13% | 19% | 67%
src/material-experimental0% | 0% | 1% | 5% | 92%
tools/postcss0% | 0% | 77% | 0% | 22%
tools/release-checks0% | 0% | 0% | 43% | 56%
scripts0% | 0% | 0% | 18% | 81%
src/components-examples0% | 0% | 0% | 2% | 97%
tools/postinstall0% | 0% | 0% | 30% | 69%
src/material-moment-adapter0% | 0% | 0% | 23% | 76%
src/material-luxon-adapter0% | 0% | 0% | 47% | 52%
tools/markdown-to-html0% | 0% | 0% | 31% | 68%
src/dev-app0% | 0% | 0% | 0% | 100%
tools/server-test0% | 0% | 0% | 0% | 100%
integration/ng-update-v130% | 0% | 0% | 0% | 100%
scripts/caretaking0% | 0% | 0% | 0% | 100%
src/e2e-app0% | 0% | 0% | 0% | 100%
src/material-date-fns-adapter0% | 0% | 0% | 0% | 100%
tools/axe-protractor0% | 0% | 0% | 0% | 100%
tools/highlight-files0% | 0% | 0% | 0% | 100%
src/universal-app0% | 0% | 0% | 0% | 100%
tools/package-docs-content0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
integration/size-test0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
ngOnChanges()
in src/google-maps/map-marker-clusterer/map-marker-clusterer.ts
78 36 1
function validateThemeMixin()
in tools/stylelint/theme-mixin-api.ts
79 21 2
private _updateRenderedContentAfterScroll()
in src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts
114 21 0
private _handleOpenKeydown()
in src/material/select/select.ts
38 21 1
private _validateDecorator()
in tools/tslint-rules/validateDecoratorsRule.ts
72 20 1
_onKeydown()
in src/material/slider/slider.ts
54 20 1
private _visitClassDeclaration()
in src/cdk/schematics/update-tool/component-resource-collector.ts
85 20 1
export function addSymbolToNgModuleMetadata()
in src/cdk/schematics/utils/vendored-ast-utils/index.ts
99 19 5
private _initializeDragSequence()
in src/cdk/drag-drop/drag-ref.ts
51 19 2
private _checkForRuntimeHammerUsage()
in src/material/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.ts
38 18 1
export function parseExampleFile()
in tools/example-module/parse-example-file.ts
50 17 2
export function sortCategorizedPropertyMembers()
in tools/dgeni/common/sort-members.ts
30 17 2
function validateIndividualSystemMixins()
in tools/stylelint/theme-mixin-api.ts
56 17 3
updateOutlineGap()
in src/material/form-field/form-field.ts
51 17 0
export function typeInElement()
in src/cdk/testing/testbed/fake-events/type-in-element.ts
44 17 2
private _calculateBoundingBoxRect()
in src/cdk/overlay/position/flexible-connected-position-strategy.ts
53 17 2
_startScrollingIfNecessary()
in src/cdk/drag-drop/drop-list-ref.ts
55 17 2
private _containInsideBoundaryOnResize()
in src/cdk/drag-drop/drag-ref.ts
41 17 0
$process()
in tools/dgeni/processors/entry-point-grouper.ts
60 16 1
function analyzeExamples()
in tools/example-module/generate-example-module.ts
83 15 2