aws / amazon-states-language-service
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 54 units with 1,112 lines of code in units (65.6% of code).
    • 2 very long units (236 lines of code)
    • 2 long units (124 lines of code)
    • 14 medium size units (430 lines of code)
    • 15 small units (216 lines of code)
    • 21 very small units (106 lines of code)
21% | 11% | 38% | 19% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts21% | 11% | 39% | 18% | 9%
js0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/validation63% | 0% | 10% | 22% | 3%
src/yaml21% | 25% | 30% | 18% | 4%
src/completion0% | 0% | 84% | 5% | 9%
src/validation/utils0% | 0% | 59% | 32% | 7%
src0% | 0% | 80% | 0% | 20%
src/utils0% | 0% | 0% | 35% | 64%
scripts0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest 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
function processLineWithColon()
in src/yaml/yamlUtils.ts
73 11 4
function processLineWithoutColon()
in src/yaml/yamlUtils.ts
51 10 4
export default function completeStateNames()
in src/completion/completeStateNames.ts
49 12 4
function getBackwardOffsetData()
in src/yaml/yamlUtils.ts
49 12 3
function getDiagnosticsForOneOfSchema()
in src/validation/utils/getDiagnosticsForNode.ts
40 8 4
36 4 1
function getCompletionList()
in src/completion/completeStateNames.ts
33 8 4
function getForwardOffsetData()
in src/yaml/yamlUtils.ts
33 9 3
export function getOffsetData()
in src/yaml/yamlUtils.ts
27 7 2
function getListOfItems()
in src/completion/completeStateNames.ts
26 9 2
export default function completeSnippets()
in src/completion/completeSnippets.ts
26 11 3
export default function completeAsl()
in src/completion/completeAsl.ts
23 3 5
function convertYAMLDiagnostic()
in src/yaml/aslYamlLanguageService.ts
23 5 2
function getDiagnosticsForRegularProperties()
in src/validation/utils/getDiagnosticsForNode.ts
22 5 3
function validateArrayNext()
in src/validation/validateStates.ts
22 7 4
21 4 1
function validateParameters()
in src/validation/validateStates.ts
19 10 2
function getLineOffsets()
in src/yaml/yamlUtils.ts
19 9 1