Genese complexity report

<- identifier.ts
Methods : 2
Complexity index : 6
Cyclomatic complexity : 2
Cognitive complexity
100 % Correct 2/2
0 % Warning 0/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 identifier.ts
run Complexity Index 3.7 Cyclomatic complexity 1
                            
                                
            
            
            // @ts-ignore
            export function run(cstNode: Infos, children): any { // ------- +0.5 Complexity index (+0.5 atomic)
                const astNode = { // -------------------------------------- +0.2 Complexity index (+0.2 atomic)
                    kind: 'Identifier', // -------------------------------- +0.2 Complexity index (+0.2 atomic)
                    start: cstNode.startOffset, // ------------------------ +0.3 Complexity index (+0.3 atomic)
                    end: cstNode.endOffset + 1, // ------------------------ +0.5 Complexity index (+0.5 atomic)
                    pos: cstNode.startOffset, // -------------------------- +0.3 Complexity index (+0.3 atomic)
                    name: cstNode.image // -------------------------------- +0.3 Complexity index (+0.3 atomic)
                };
                setType(astNode); // -------------------------------------- +1.2 Complexity index (+0.2 atomic, +1 structural)
                return astNode ; // --------------------------------------- +0.2 Complexity index (+0.2 atomic)
            }
            
                            
                        
setType Complexity Index 2.3 Cyclomatic complexity 1
                            
                                
            
            
            function setType(astNode) { // ------------------ +0.2 Complexity index (+0.2 atomic)
                switch (astNode.name) { // ------------------ +1.3 Complexity index (+0.3 atomic, +1 structural)
                    case 'forEach': // ---------------------- +0.2 Complexity index (+0.2 atomic)
                        astNode.type = 'function'; // ------- +0.4 Complexity index (+0.4 atomic)
                        return astNode; // ------------------ +0.2 Complexity index (+0.2 atomic)
                }
            }