@@ -59,14 +59,15 @@ public override void Initialize(AnalysisContext context)
5959 /// Analyzes the top-level <c><summary></c> element of a documentation comment.
6060 /// </summary>
6161 /// <param name="context">The current analysis context.</param>
62+ /// <param name="documentation">The documentation syntax associated with the element.</param>
6263 /// <param name="syntax">The <see cref="XmlElementSyntax"/> or <see cref="XmlEmptyElementSyntax"/> of the node
6364 /// to examine.</param>
6465 /// <param name="completeDocumentation">The complete documentation for the declared symbol, with any
6566 /// <c><include></c> elements expanded. If the XML documentation comment included a <c><summary></c>
6667 /// element, this value will be <see langword="null"/>, even if the XML documentation comment also included an
6768 /// <c><include></c> element.</param>
6869 /// <param name="diagnosticLocations">The location(s) where diagnostics, if any, should be reported.</param>
69- protected abstract void HandleXmlElement ( SyntaxNodeAnalysisContext context , XmlNodeSyntax syntax , XElement completeDocumentation , params Location [ ] diagnosticLocations ) ;
70+ protected abstract void HandleXmlElement ( SyntaxNodeAnalysisContext context , DocumentationCommentTriviaSyntax documentation , XmlNodeSyntax syntax , XElement completeDocumentation , params Location [ ] diagnosticLocations ) ;
7071
7172 private void HandleCompilationStart ( CompilationStartAnalysisContext context )
7273 {
@@ -219,12 +220,6 @@ private void HandleDeclaration(SyntaxNodeAnalysisContext context, SyntaxNode nod
219220 return ;
220221 }
221222
222- if ( documentation . Content . GetFirstXmlElement ( XmlCommentHelper . InheritdocXmlTag ) != null )
223- {
224- // Ignore nodes with an <inheritdoc/> tag.
225- return ;
226- }
227-
228223 XElement completeDocumentation = null ;
229224 var relevantXmlElement = documentation . Content . GetFirstXmlElement ( XmlCommentHelper . SummaryXmlTag ) ;
230225 if ( relevantXmlElement == null )
@@ -235,15 +230,10 @@ private void HandleDeclaration(SyntaxNodeAnalysisContext context, SyntaxNode nod
235230 var declaration = context . SemanticModel . GetDeclaredSymbol ( node , context . CancellationToken ) ;
236231 var rawDocumentation = declaration ? . GetDocumentationCommentXml ( expandIncludes : true , cancellationToken : context . CancellationToken ) ;
237232 completeDocumentation = XElement . Parse ( rawDocumentation , LoadOptions . None ) ;
238- if ( completeDocumentation . Nodes ( ) . OfType < XElement > ( ) . Any ( element => element . Name == XmlCommentHelper . InheritdocXmlTag ) )
239- {
240- // Ignore nodes with an <inheritdoc/> tag in the included XML.
241- return ;
242- }
243233 }
244234 }
245235
246- this . HandleXmlElement ( context , relevantXmlElement , completeDocumentation , locations ) ;
236+ this . HandleXmlElement ( context , documentation , relevantXmlElement , completeDocumentation , locations ) ;
247237 }
248238 }
249239}
0 commit comments