I am exceptionally anal when it comes to StyleCop. I like to ensure that my class libraries are well laid out, maintainable, and appropriately documented.

Say for example I create an interface:

public interface ICustomImpl
{
    /// <summary>
    /// Say hello!
    /// </summary>
    void SayHello();
}

and then I implement my interface

public class Hello : ICustomImpl
{
    public void SayHello()
    {
        //impl
    }
}

StyleCop will now complain that I have not added a summary tag to my method implementation, however I have a summary tag on the interface.

Are there any known plugins that will automatically copy summary tags where available?

Note: I would like this to work for interface implementations and method overrides.

有帮助吗?

解决方案

You are looking for GhostDoc. Well worth the price, it will do what you are looking for, plus write comments from scratch for many different methods and properties.

其他提示

This is just a tangent to your initial problem and GhostDoc is the correct answer. This is just an alternative:

You could also be able to use the <inheritdoc /> tag for any classes that have derived this interface.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top