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.
StyleCop plugin for overriding / implementing summary XML [closed]
-
06-07-2023 - |
Pergunta
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.
Solução
Outras dicas
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.