Skip to content

doc-summary-text

C#styleno fixdefault: offcsharp/stylecopcsharp/roslynator

Reports a <summary> without text (<summary></summary>; <summary /> is not reported). Partial types and methods belong to doc-partial-summary-text. No fix.

An empty summary is a placeholder that was never filled in: it satisfies a check that a summary exists and tells the reader nothing.

To fix, write the summary.

Reported
/// <summary></summary>
public class EmptySummary
{
/// <summary>
/// </summary>
public void Blank() { }
/// <summary />
public void SelfClosing() { }
/// <summary><see cref="Blank"/></summary>
...
/// <summary>
/// <!-- comment -->
/// </summary>
public void OnlyComment() { }
/// <summary> </summary>
public int Field;
/// <summary></summary>
public int First, Second;
}
...
public class Defaults
...
csharp:
lint:
rules:
doc-summary-text: warn # off (default), warn, error

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

Suppress one line with sudsy-disable-next-line doc-summary-text 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 RCS1138 full
StyleCop SA1606 full