private static void CheckCopyrightHeader(SyntaxTreeAnalysisContext context, DocumentationSettings documentationSettings, Compilation compilation, XmlFileHeader fileHeader) { var copyrightElement = fileHeader.GetElement("copyright"); if (copyrightElement == null) { context.ReportDiagnostic(Diagnostic.Create(SA1634Descriptor, fileHeader.GetLocation(context.Tree))); return; } if (!compilation.IsAnalyzerSuppressed(SA1637Descriptor)) { CheckFile(context, compilation, fileHeader, copyrightElement); } if (!compilation.IsAnalyzerSuppressed(SA1640Descriptor)) { CheckCompanyName(context, documentationSettings, compilation, fileHeader, copyrightElement); } if (!compilation.IsAnalyzerSuppressed(SA1635Descriptor)) { CheckCopyrightText(context, documentationSettings, compilation, fileHeader, copyrightElement); } }
private static void CheckSummaryHeader(SyntaxTreeAnalysisContext context, Compilation compilation, XmlFileHeader fileHeader) { var summaryElement = fileHeader.GetElement("summary"); if (summaryElement == null) { context.ReportDiagnostic(Diagnostic.Create(SA1639Descriptor, fileHeader.GetLocation(context.Tree))); return; } if (string.IsNullOrWhiteSpace(summaryElement.Value)) { var location = fileHeader.GetElementLocation(context.Tree, summaryElement); context.ReportDiagnostic(Diagnostic.Create(SA1639Descriptor, location)); } }