Skip to content

Commit 3b59095

Browse files
Simplify documentation inheritation check in ElementDocumentationBase
Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
1 parent ad20436 commit 3b59095

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/ElementDocumentationBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ private void HandleDeclaration(SyntaxNodeAnalysisContext context, StyleCopSettin
235235
.Where(x => !string.Equals(x.GetName()?.ToString(), XmlCommentHelper.IncludeXmlTag, StringComparison.Ordinal))
236236
: documentation.Content.GetXmlElements(this.matchElementName);
237237

238-
var isInheritingDocumentation = documentation.Content
239-
.Any(x => string.Equals(x.GetName()?.ToString(), XmlCommentHelper.IncludeXmlTag, StringComparison.Ordinal));
238+
var isInheritingDocumentation =
239+
documentation.Content.GetFirstXmlElement(XmlCommentHelper.IncludeXmlTag) is object;
240240

241241
if (isInheritingDocumentation)
242242
{

0 commit comments

Comments
 (0)