public override int GetCognitiveComplexity(SyntaxNode node) { var walker = new CognitiveComplexityWalker(); walker.Walk(node); return(walker.VisitEndedCorrectly ? walker.Complexity : -1); }
public override int GetCognitiveComplexity(SyntaxNode node) { var walker = new CognitiveComplexityWalker(); walker.Walk(node); // nesting level should be 0 at the end of the analysis, otherwise there is a bug return(walker.NestingLevel == 0 ? walker.Complexity : -1); }
public InnerWalker(CognitiveComplexityWalker parent) { this.parent = parent; }