Genese complexity report

<- project.service.ts
Methods : 3
Complexity index : 21.2
Cyclomatic complexity : 3
Cognitive complexity
66.7 % Correct 2/3
33.3 % Warning 1/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 project.service.ts
Complexity Index 0.8 Cyclomatic complexity 0
                            
                                
                
            
                constructor(tsConfigFilePath: string) { // --------------------- +0.2 Complexity index (+0.2 atomic)
                    this.project = new Project({ tsConfigFilePath }); // ------- +0.6 Complexity index (+0.6 atomic)
                }
            
                            
                        
addToRefactorProposals Complexity Index 12.5 Cyclomatic complexity 2
                            
                                
                
            
            
                /**
                 * Add new refactor proposals to the list, and replace the existing ones
                 * @param refactorProposals
                 */
                addToRefactorProposals(refactorProposals: RefactorProposal[]): void { // -------------------- +0.5 Complexity index (+0.5 atomic)
                    refactorProposals.forEach(proposal => { // ---------------------------------------------- +2.4 Complexity index (+0.4 atomic, +2 structural)
                        const index = this.refactorProposals.findIndex(r => r.id === proposal.id); // ------- +4.2 Complexity index (+1.2 atomic, +1 nesting, +2 structural)
                        if (index !== -1) { // -------------------------------------------------------------- +2.4 Complexity index (+0.4 atomic, +1 nesting, +1 structural)
                            this.refactorProposals[index] = proposal; // ------------------------------------ +0.5 Complexity index (+0.5 atomic)
                        } else { // ------------------------------------------------------------------------- +1.1 Complexity index (+0.1 atomic, +1 structural)
                            this.refactorProposals.push(proposal); // --------------------------------------- +1.4 Complexity index (+0.4 atomic, +1 structural)
                        }
                    })
                }
            
                            
                        
getNodesOfKinds Complexity Index 7.9 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Get systems of a given Syntax Kind
                 * @param kind the kind
                 * @returns {Node[]}
                 */
                getNodesOfKinds<T extends SyntaxKind>(kind: T): Node[] { // -------------- +0.7 Complexity index (+0.7 atomic)
                    const SYSTEMS: KindToNodeMappings[T][] = []; // ---------------------- +0.5 Complexity index (+0.5 atomic)
                    this.project.getSourceFiles().forEach((sf: SourceFile) => { // ------- +3.7 Complexity index (+0.7 atomic, +3 structural)
                        const FILE_SYSTEMS = sf.getDescendantsOfKind(kind); // ----------- +1.5 Complexity index (+0.5 atomic, +1 structural)
                        SYSTEMS.push(...FILE_SYSTEMS); // -------------------------------- +1.3 Complexity index (+0.3 atomic, +1 structural)
                    });
                    return SYSTEMS; // --------------------------------------------------- +0.2 Complexity index (+0.2 atomic)
                }