Ejemplo n.º 1
0
        public static void ReportMessageComment(this SymbolAnalysisContext context,
                                                DocumentationCommentTriviaSyntax documentationSyntax)
        {
            var xmlCommentElement = documentationSyntax.GetXmlCommentParam(MessageConstants.ParameterName);

            if (xmlCommentElement == null)
            {
                return;
            }

            if (xmlCommentElement.GetSimpleCommentText().EqualsString(MessageConstants.DefaultComment))
            {
                return;
            }

            context.ReportDiagnostic(Diagnostic.Create(Descriptors.MessageComment, xmlCommentElement.GetLocation()));
        }