apple / swift-docc-render
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 186 units with 1,567 lines of code in units (7.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (29 lines of code)
    • 7 simple units (164 lines of code)
    • 178 very simple units (1,374 lines of code)
0% | 0% | 1% | 10% | 87%
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
js0% | 0% | 1% | 11% | 86%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/mixins0% | 0% | 11% | 13% | 74%
src/utils0% | 0% | 0% | 14% | 85%
src/setup-utils0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
src/stores0% | 0% | 0% | 0% | 100%
src/plugins0% | 0% | 0% | 0% | 100%
src/directives0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async handler()
in src/mixins/apiChangesObserving.js
29 11 2
function indentSwiftDeclaration()
in src/utils/indentation.js
33 9 1
export function pluralize()
in src/utils/strings.js
22 9 2
function walkThemeObject()
in src/utils/themes.js
17 8 4
getOptionsForDiffAvailabilities()
in src/mixins/apiChangesHelpers.js
34 7 1
export async function scrollBehavior()
in src/utils/router-utils.js
20 7 3
function remove()
in src/utils/json-patch.js
26 6 2
12 6 1
isClientMobile()
in src/mixins/isClientMobile.js
11 5 0
onFocus()
in src/utils/FocusTrap.js
17 5 1
isFocusableElement()
in src/utils/TabManager.js
8 5 1
6 5 1
function iterateOverSiblings()
in src/utils/changeElementVOVisibility.js
14 5 2
21 5 3
export default function debounce()
in src/utils/debounce.js
17 5 4
function parseArrayIndex()
in src/utils/json-patch.js
10 5 2
function add()
in src/utils/json-patch.js
24 5 3
function isEqual()
in src/utils/json-patch.js
18 5 2
function handleScroll()
in src/utils/scroll-lock.js
11 5 2
21 5 1