Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public void FileLines()
 {
     var diagnostic = new FileLines {Maximum = 12};
     Verifier.VerifyAnalyzer(@"TestCases\FileLines12.cs", diagnostic);
     Verifier.VerifyAnalyzer(@"TestCases\FileLines13.cs", diagnostic);
 }