private void AddAnalyzerFileLines(ImmutableArray<DiagnosticAnalyzer>.Builder builder) { var analyzer = new FileLines(); if (!AnalyzerIds.Contains(analyzer.SupportedDiagnostics.Single().Id)) { return; } analyzer.Maximum = int.Parse( Parameters[analyzer.SupportedDiagnostics.Single().Id].Single()["maximumFileLocThreshold"], NumberStyles.None, CultureInfo.InvariantCulture); builder.Add(analyzer); }
public void FileLines() { var diagnostic = new FileLines {Maximum = 12}; Verifier.VerifyAnalyzer(@"TestCases\FileLines12.cs", diagnostic); Verifier.VerifyAnalyzer(@"TestCases\FileLines13.cs", diagnostic); }