Skip to content

doc-summary-required

C#styleno fixdefault: offcsharp/stylecopcsharp/roslynator

Reports a documentation comment without <summary> (and without <inheritdoc />) on a type, member or field that needs documentation: everything but private members. Partial types and methods belong to doc-partial-summary-required. No fix.

The summary is what tools show in lists, in hovers and in the generated reference. A comment without it appears without a description, however much the other tags say.

To fix, add a <summary>.

Reported
...
public class NoSummary
...
public int Field;
...
public int First, Second;
...
public NoSummary() { }
...
~NoSummary() { }
...
public int this[int index] => index;
...
public event System.EventHandler Changed;
...
public delegate void Callback();
...
public enum Kind
...
internal int Internal;
...
protected int Protected;
...
public interface IInterface
...
csharp:
lint:
rules:
doc-summary-required: warn # off (default), warn, error

Enabled by the presets: csharp/stylecop, csharp/roslynator.

Suppress one line with sudsy-disable-next-line doc-summary-required in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
Roslynator RCS1139 full
StyleCop SA1604 full