Genese complexity report

<- constructor-declaration.ts
Methods : 1
Complexity index : 19.8
Cyclomatic complexity : 1
Cognitive complexity
0 % Correct 0/1
100 % Warning 1/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 constructor-declaration.ts
run Complexity Index 19.8 Cyclomatic complexity 1
                            
                                
            
            
            
            export function run(cstNode: ConstructorDeclarationElement, children: ConstructorDeclarationElementChildren): any { // ------- +0.6 Complexity index (+0.6 atomic)
                const constructorBody = children.constructorBody; // --------------------------------------------------------------------- +0.4 Complexity index (+0.4 atomic)
                const constructorDeclarator = children.constructorDeclarator; // --------------------------------------------------------- +0.4 Complexity index (+0.4 atomic)
                const constructorDeclaratorAst = [].concat(...constructorDeclarator.map(e => cstToAst(e))); // --------------------------- +4.9 Complexity index (+0.9 atomic, +4 structural)
                const name = constructorDeclaratorAst.find(e => e.kind === 'Identifier').name; // ---------------------------------------- +3.1 Complexity index (+1.1 atomic, +2 structural)
            
                return { // -------------------------------------------------------------------------------------------------------------- +0.1 Complexity index (+0.1 atomic)
                    kind: 'Constructor', // ---------------------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    start: cstNode.location.startOffset, // ------------------------------------------------------------------------------ +0.4 Complexity index (+0.4 atomic)
                    end: cstNode.location.endOffset, // ---------------------------------------------------------------------------------- +0.4 Complexity index (+0.4 atomic)
                    pos: cstNode.location.startOffset, // -------------------------------------------------------------------------------- +0.4 Complexity index (+0.4 atomic)
                    name: name, // ------------------------------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    children: [ // ------------------------------------------------------------------------------------------------------- +0.1 Complexity index (+0.1 atomic)
                        ...[].concat(...constructorDeclaratorAst.filter(e => e.kind === 'Parameter')), // -------------------------------- +3.9 Complexity index (+0.9 atomic, +3 structural)
                        ...[].concat(...constructorBody.map(e => cstToAst(e))), // ------------------------------------------------------- +4.7 Complexity index (+0.7 atomic, +4 structural)
                    ]
                };
            }