예제 #1
0
        public void FunctionComplexity_CSharp()
        {
            var diagnostic = new SonarAnalyzer.Rules.CSharp.FunctionComplexity {
                Maximum = 3
            };

            Verifier.VerifyAnalyzer(@"TestCases\FunctionComplexity.cs", diagnostic);
        }
        public void FunctionComplexity_InsufficientExecutionStack_CSharp()
        {
            var diagnostic = new SonarAnalyzer.Rules.CSharp.FunctionComplexity {
                Maximum = 3
            };

            Verifier.VerifyAnalyzer(@"TestCases\SyntaxWalker_InsufficientExecutionStackException.cs", diagnostic);
        }
예제 #3
0
 public void FunctionComplexity_InsufficientExecutionStack_CSharp()
 {
     if (!TestContextHelper.IsAzureDevOpsContext) // ToDo: Test doesn't work on Azure DevOps
     {
         var diagnostic = new SonarAnalyzer.Rules.CSharp.FunctionComplexity {
             Maximum = 3
         };
         Verifier.VerifyAnalyzer(@"TestCases\SyntaxWalker_InsufficientExecutionStackException.cs", diagnostic);
     }
 }
예제 #4
0
        public void FunctionComplexity_CSharp()
        {
            var diagnostic = new SonarAnalyzer.Rules.CSharp.FunctionComplexity {
                Maximum = 3
            };

            Verifier.VerifyAnalyzer(@"TestCases\FunctionComplexity.cs",
                                    diagnostic,
                                    options: ParseOptionsHelper.FromCSharp8);
        }