protected override IEnumerable <Diagnostic> AnalyzeComment(ISymbol symbol, string commentXml) { foreach (var xmlTag in XmlTags) { foreach (var unused in CommentExtensions.GetCommentElements(commentXml, xmlTag) .Select(_ => _.Nodes().ConcatenatedWith().TrimStart()) .Select(_ => _.Without(Constants.Comments.SpecialOrPhrase)) .Where(_ => _.Length > 0) .Where(_ => _[0].IsUpperCase() is false && _[0] != Constants.Comments.XmlElementStartingTag[0])) { yield return(Issue(symbol, xmlTag)); } } }
private static bool TagCommentHasIssue(string commentXml, string xmlTag) => CommentExtensions.GetCommentElements(commentXml, xmlTag).SelectMany(_ => _.Nodes()).Any(CommentHasIssue);