Feature Request: Inherited Documentation Rule

Oct 26, 2011 at 1:27 PM

Hi,

One feature that I feel is missing from stylecop is a rule which prevents documentation header errors (SA1600)  from being thrown on override methods if documentation is provided in the base class.

It does become annoying having to copy and paste headers to all inherited classes. Would it be possible to implement such a rule in stylecop plus?

 

Many Thanks

Keith

Coordinator
Oct 28, 2011 at 3:14 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Oct 28, 2011 at 3:43 PM

Did I understand you right that it would be OK to have so called "Extended Original Rule" SP1600, that behaves like SA1600, but allows override methods not to have documentation?

Best regards,
Oleg Shuruev

Oct 31, 2011 at 12:39 PM

use <inheritdoc /> on your override methods

Coordinator
Nov 2, 2011 at 7:58 PM

In general, I would agree with reitzmichnicht, but would also like to clarify my own position about documentation rules in StyleCop at whole.

I believe that they definetely need more flexible customization (like StyleCop+ does for naming rules).
Users should decide by theirselves - where they do want summary, where they don't,  where summary should follow specified template (e.g. in constructors) and what template is, where to use <inheritdoc /> or whatever, and so on.

I would really like to implement it in StyleCop+, but I feel that I just don't have enough time to do it in this year.

So it is OK for me to add "extended" rule quickly.
It is not hard, and if it is useful for others it would be just great.

What do you think?

Best regards,
Oleg Shuruev