Genese complexity report

<- if-statement.ts
Methods : 1
Complexity index : 12.6
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 if-statement.ts
run Complexity Index 12.6 Cyclomatic complexity 1
                            
                                
            
            
            // @ts-ignore
            export function run(cstNode: IfStatement, children: IfStatementChildren): any { // ------- +0.6 Complexity index (+0.6 atomic)
                const expressions = children.expression; // ------------------------------------------ +0.4 Complexity index (+0.4 atomic)
                const statements = children.statement; // -------------------------------------------- +0.4 Complexity index (+0.4 atomic)
            
                return { // -------------------------------------------------------------------------- +0.1 Complexity index (+0.1 atomic)
                    kind: 'IfStatement', // ---------------------------------------------------------- +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)
                    children: [ // ------------------------------------------------------------------- +0.1 Complexity index (+0.1 atomic)
                        ...[].concat(...expressions.map(e => cstToAst(e)) ?? []), // ----------------- +4.8 Complexity index (+0.8 atomic, +4 structural)
                        ...[].concat(...statements.map(e => cstToAst(e)) ?? []) // ------------------- +4.8 Complexity index (+0.8 atomic, +4 structural)
                    ]
                };
            }