aws-cloudformation / cfn-lint-visual-studio-code
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 22 units with 424 lines of code in units (71.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (129 lines of code)
    • 4 simple units (75 lines of code)
    • 17 very simple units (220 lines of code)
0% | 0% | 30% | 17% | 51%
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% | 30% | 17% | 51%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
server/src0% | 0% | 82% | 10% | 7%
client/src/yaml-support0% | 0% | 0% | 31% | 68%
client/src0% | 0% | 0% | 14% | 85%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function runLinter()
in server/src/server.ts
129 12 1
21 8 0
function requestYamlSchemaUriCallback()
in client/src/yaml-support/yaml-schema.ts
21 6 1
async function activateYamlExtension()
in client/src/yaml-support/yaml-schema.ts
16 6 0
function isCloudFormation()
in server/src/server.ts
17 6 2
export function getYamlMappingValue()
in client/src/yaml-support/yaml-util.ts
9 5 3
export function getYamlMappingNode()
in client/src/yaml-support/yaml-util.ts
9 5 3
function requestYamlSchemaContentCallback()
in client/src/yaml-support/yaml-schema.ts
10 4 1
export function activate()
in client/src/extension.ts
81 4 1
function convertSeverity()
in server/src/server.ts
11 4 1
export async function registerYamlSchemaSupport()
in client/src/yaml-support/yaml-schema.ts
8 3 0
export function equalIgnoreCase()
in client/src/yaml-support/yaml-util.ts
3 3 2
export function loadJson()
in client/src/yaml-support/yaml-util.ts
9 3 1
private ensureCache()
in client/src/yaml-support/yaml-locator.ts
11 3 2
function reloadSidePreview()
in client/src/extension.ts
27 3 2
public loadSchemaFromRaw()
in client/src/yaml-support/schema-holder.ts
3 1 0
export function isMapping()
in client/src/yaml-support/yaml-locator.ts
3 1 1
export function isSequence()
in client/src/yaml-support/yaml-locator.ts
3 1 1
export function isMappingItem()
in client/src/yaml-support/yaml-locator.ts
3 1 1
public getMatchedElement()
in client/src/yaml-support/yaml-locator.ts
6 1 2