Support the <inheritdoc/> tag to indicate documentation is inherited from base member


JavaDoc has an @inheritDoc attribute to indicate that a member which is overriding a base class member, or implementing an interface member, inherits its documentation from that member. Support for this feature is growing in the .NET community (e.g. http://www.codeplex.com/Sandcastle/Thread/View.aspx?ThreadId=22873, http://www.jetbrains.net/jira/browse/RSRP-33352) and is something that is extremely useful when working in service-oriented applications where interfaces define implementations, and then classes provided by an IoC container provide the implementation.

Ideally if a member is annotated with this, StyleCop should check that it does either implement an interface or override a base class method and raise an error saying you cannot use <inheritdoc/> if it doesn't; if it does then it should ignore any documentation validation rules for that member. Inheritdoc can be used in many complex ways :see http://www.ewoodruff.us/shfbdocs/html/79897974-ffc9-4b84-91a5-e50c66a0221d.htm for details
Closed Mar 22, 2011 at 6:49 PM by SMSloggett
Tested and fixed.


andyr wrote May 17, 2010 at 4:58 PM

Fixed pending review.

andyr wrote Jun 28, 2010 at 5:53 PM


** Closed by andyr 06/28/2010 9:53AM

nathanfunk wrote Aug 19, 2010 at 6:46 PM

We really need this feature because our code is filled with SurpressMessages for SA1604. It looks like this is not included in the 4.4 release yet. Is there a target release for this (Work Item Details shows Release Unassigned)?

andyr wrote Aug 19, 2010 at 7:20 PM

It's fixed in the main branch and will be in the next release 4.4.1

andyr wrote Aug 19, 2010 at 7:22 PM

It's also in the 4.4.1 preview that is avail for download now

andyr wrote Aug 26, 2010 at 12:42 PM


andyr wrote Aug 26, 2010 at 12:43 PM

Throwing an error for methods on classes that have no base class but do have an interface - this is valid.

andyr wrote Aug 26, 2010 at 1:09 PM

Fixed with latest push to 4.4.1

ChildNode wrote Oct 30, 2014 at 3:05 PM

seems to I've a wrong setup with VS 2012 and StyleCop 4.7 or s.th. else is wrong or unknown to me:
HOW can I use this? There is no <inheritDoc> for me (no completion at all)