aws / amazon-states-language-service
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 54 units with 1,112 lines of code in units (65.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (132 lines of code)
    • 5 medium complex units (301 lines of code)
    • 11 simple units (297 lines of code)
    • 37 very simple units (382 lines of code)
0% | 11% | 27% | 26% | 34%
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% | 11% | 27% | 26% | 33%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/validation0% | 63% | 0% | 19% | 17%
src/yaml0% | 0% | 45% | 26% | 27%
src/completion0% | 0% | 40% | 31% | 27%
src/validation/utils0% | 0% | 0% | 53% | 46%
src/utils0% | 0% | 0% | 17% | 82%
src0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export default function validateStates()
in src/validation/validateStates.ts
132 37 4
export const getLanguageService = function()
in src/yaml/aslYamlLanguageService.ts
104 17 3
export default function completeStateNames()
in src/completion/completeStateNames.ts
49 12 4
function getBackwardOffsetData()
in src/yaml/yamlUtils.ts
49 12 3
export default function completeSnippets()
in src/completion/completeSnippets.ts
26 11 3
function processLineWithColon()
in src/yaml/yamlUtils.ts
73 11 4
function validateParameters()
in src/validation/validateStates.ts
19 10 2
function processLineWithoutColon()
in src/yaml/yamlUtils.ts
51 10 4
function getListOfItems()
in src/completion/completeStateNames.ts
26 9 2
function getLineOffsets()
in src/yaml/yamlUtils.ts
19 9 1
function getForwardOffsetData()
in src/yaml/yamlUtils.ts
33 9 3
function getDiagnosticsForOneOfSchema()
in src/validation/utils/getDiagnosticsForNode.ts
40 8 4
export default function getDiagnosticsForNode()
in src/validation/utils/getDiagnosticsForNode.ts
16 8 3
function getCompletionList()
in src/completion/completeStateNames.ts
33 8 4
function validateArrayNext()
in src/validation/validateStates.ts
22 7 4
export function getOffsetData()
in src/yaml/yamlUtils.ts
27 7 2
export function getListOfStateNamesFromStateNode()
in src/utils/astUtilityFunctions.ts
11 6 2
function getDiagnosticsForRegularProperties()
in src/validation/utils/getDiagnosticsForNode.ts
22 5 3
function getStatesFromStartAtNode()
in src/completion/completeStateNames.ts
11 5 2
function convertYAMLDiagnostic()
in src/yaml/aslYamlLanguageService.ts
23 5 2