Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiler warning CS1591: How to show that warning only for undocumented methods?

The C# compiler shows a warning (CS1591), if a public member is undocumented:

Warning ... Missing XML comment for publicly visible type or member ...

That includes all properties, methods, classes, enum value, etc.

Question: Is there a way to configure that type of warning to only mark undocumented methods? I use Visual Studio 2010 Ultimate and ReSharper 8.2.

Example:

public class MyClass // warning
{
    public MyClass(int x) { ... } // warning

    public void DoSomething() { ... } // warning

    public int MyProp { get; private set; } // prevent this warning
}

public enum MyEnum // warning
{
    X = 0, // prevent this warning
    Y = 1 // prevent this warning
}
like image 685
Christian St. Avatar asked Sep 15 '14 10:09

Christian St.


1 Answers

You can disable it for the entire assembly if you wish.

Project Properties > Build tab > Suppress warnings: 1591

source: https://stackoverflow.com/a/13414522

like image 72
Chris Marisic Avatar answered Oct 22 '22 07:10

Chris Marisic