Ejemplo n.º 1
0
        public override int GetCognitiveComplexity(SyntaxNode node)
        {
            var walker = new CognitiveComplexityWalker();

            walker.Walk(node);
            return(walker.VisitEndedCorrectly ? walker.Complexity : -1);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public InnerWalker(CognitiveComplexityWalker parent)
 {
     this.parent = parent;
 }