Genese complexity report

<- interface-method-declaration.ts
Methods : 2
Complexity index : 16.2
Cyclomatic complexity : 5
Cognitive complexity
50 % Correct 1/2
50 % Warning 1/2 (threshold : 10)
0 % Error 0/2 (threshold : 20)
Cyclomatic complexity
100 % Correct 2/2
0 % Warning 0/2 (threshold : 5)
0 % Error 0/2 (threshold : 10)
Methods of interface-method-declaration.ts
run Complexity Index 14.2 Cyclomatic complexity 1
                            
                                
            
            
            // @ts-ignore
            export function run(cstNode: InterfaceMethodDeclaration, children: InterfaceMethodDeclarationChildren): any { // ------- +0.6 Complexity index (+0.6 atomic)
                const methodHeader = children.methodHeader; // --------------------------------------------------------------------- +0.4 Complexity index (+0.4 atomic)
                const methodBody = children.methodBody; // ------------------------------------------------------------------------- +0.4 Complexity index (+0.4 atomic)
            
                const methodHeaderAst = methodHeader.map(e => cstToAst(e)); // ----------------------------------------------------- +3.8 Complexity index (+0.8 atomic, +3 structural)
            
                return { // -------------------------------------------------------------------------------------------------------- +0.1 Complexity index (+0.1 atomic)
                    kind: 'MethodDeclaration', // ---------------------------------------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    start: cstNode.location.startOffset, // ------------------------------------------------------------------------ +0.4 Complexity index (+0.4 atomic)
                    end: cstNode.location.endOffset + 1, // ------------------------------------------------------------------------ +0.6 Complexity index (+0.6 atomic)
                    pos: cstNode.location.startOffset, // -------------------------------------------------------------------------- +0.4 Complexity index (+0.4 atomic)
                    name: getName(methodHeaderAst), // ----------------------------------------------------------------------------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    children: [ // ------------------------------------------------------------------------------------------------- +0.1 Complexity index (+0.1 atomic)
                        ...[].concat(...methodHeaderAst), // ----------------------------------------------------------------------- +1.2 Complexity index (+0.2 atomic, +1 structural)
                        ...[].concat(...methodBody.map(e => cstToAst(e))), // ------------------------------------------------------ +4.7 Complexity index (+0.7 atomic, +4 structural)
                    ]
                };
            }
            
                            
                        
getName Complexity Index 2 Cyclomatic complexity 4
                            
                                
            
            
            function getName(methodHeaderAst): string { // ------------- +0.3 Complexity index (+0.3 atomic)
                return methodHeaderAst?.[0]?.[1]?.name ?? ''; // ------- +1.7 Complexity index (+0.7 atomic, +1 aggregation)
            }