Genese complexity report

<- for.mock.ts
Methods : 3
Complexity index : 15.6
Cyclomatic complexity : 7
Cognitive complexity
100 % Correct 3/3
0 % Warning 0/3 (threshold : 10)
0 % Error 0/3 (threshold : 20)
Cyclomatic complexity
100 % Correct 3/3
0 % Warning 0/3 (threshold : 5)
0 % Error 0/3 (threshold : 10)
Methods of for.mock.ts
forMethod Complexity Index 2.8 Cyclomatic complexity 2
                            
                                
            
            
                forMethod(a) { // ------------------- +0.2 Complexity index (+0.2 atomic)
                    for (const elt of a) { // ------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                        console.log(elt); // -------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    }
                }
            
                            
                        
forEachMethod Complexity Index 3.9 Cyclomatic complexity 1
                            
                                
                
            
            
                forEachMethod(a) { // ------------ +0.2 Complexity index (+0.2 atomic)
                    a.forEach(e => { // ---------- +2.4 Complexity index (+0.4 atomic, +2 structural)
                        console.log(e); // ------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    })
                }
            
                            
                        
forForFor Complexity Index 8.9 Cyclomatic complexity 4
                            
                                
                
            
            
                forForFor(max: number) { // ------------------------- +0.2 Complexity index (+0.2 atomic)
                    let total = 0; // ------------------------------- +0.3 Complexity index (+0.3 atomic)
                    for (let i = 1; i < max; ++i) { // -------------- +1.7 Complexity index (+0.7 atomic, +1 structural)
                        for (let j = 2; j < i; ++j) { // ------------ +2.2 Complexity index (+0.7 atomic, +0.5 nesting, +1 structural)
                            for (let k = 2; k < 10; ++k) { // ------- +2.7 Complexity index (+0.7 atomic, +1 nesting, +1 structural)
                                console.log(`k = ${k}`); // --------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                            }
                        }
                        total += i; // ------------------------------ +0.3 Complexity index (+0.3 atomic)
                    }
                    return total; // -------------------------------- +0.2 Complexity index (+0.2 atomic)
                }