Domanda

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.

È stato utile?

Soluzione

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.

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top