Beispiel #1
0
 private void AddAnalyzerMethodName(ImmutableArray<DiagnosticAnalyzer>.Builder builder)
 {
     var analyzer = new MethodName();
     if (!AnalyzerIds.Contains(analyzer.SupportedDiagnostics.Single().Id))
     {
         return;
     }
     analyzer.Convention = Parameters[analyzer.SupportedDiagnostics.Single().Id].Single()["format"];
     builder.Add(analyzer);
 }
 public void MethodName()
 {
     var diagnostic = new MethodName {Convention = "^[A-Z][a-zA-Z0-9]+$"};
     Verifier.VerifyAnalyzer(@"TestCases\MethodName.cs", diagnostic);
 }