private void AddAnalyzerExpressionCOmplexity(ImmutableArray<DiagnosticAnalyzer>.Builder builder) { var analyzer = new ExpressionComplexity(); if (!AnalyzerIds.Contains(analyzer.SupportedDiagnostics.Single().Id)) { return; } analyzer.Maximum = int.Parse( Parameters[analyzer.SupportedDiagnostics.Single().Id].Single()["max"], NumberStyles.None, CultureInfo.InvariantCulture); builder.Add(analyzer); }
public void ExpressionComplexity() { var diagnostic = new ExpressionComplexity {Maximum = 3}; Verifier.Verify(@"TestCases\ExpressionComplexity.cs", diagnostic); }