Genese complexity report

<- complexity.service.ts
Methods : 1
Complexity index : 6.3
Cyclomatic complexity : 1
Cognitive complexity
100 % Correct 1/1
0 % Warning 0/1 (threshold : 10)
0 % Error 0/1 (threshold : 20)
Cyclomatic complexity
100 % Correct 1/1
0 % Warning 0/1 (threshold : 5)
0 % Error 0/1 (threshold : 10)
Methods of complexity.service.ts
getCpxFromSourceCode Complexity Index 6.3 Cyclomatic complexity 1
                            
                                
            
                /**
                 * Get the cognitive complexity of the given source code
                 * @param sourceCode
                 * @returns {number}
                 */
                static getCpxFromSourceCode(sourceCode: string): number { // ------------------------------------------------ +0.3 Complexity index (+0.3 atomic)
                    const initGenerationService = new InitGenerationService(); // ------------------------------------------- +0.4 Complexity index (+0.4 atomic)
                    const jsonAst: JsonAstInterface = { // ------------------------------------------------------------------ +0.3 Complexity index (+0.3 atomic)
                        astFolder: undefined // ----------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    };
                    let astFolder = initGenerationService.generateAstFolderFromString(sourceCode).astFolder as any // ------- +1.7 Complexity index (+0.7 atomic, +1 structural)
                    astFolder = JsonService.astPropertyNames(astFolder); // ------------------------------------------------- +1.5 Complexity index (+0.5 atomic, +1 structural)
                    jsonAst.astFolder = astFolder; // ----------------------------------------------------------------------- +0.4 Complexity index (+0.4 atomic)
            
                    return JsonAstToReports.getTotalCpx(jsonAst as JsonAst); // --------------------------------------------- +1.5 Complexity index (+0.5 atomic, +1 structural)
                }