Skip to content

doc-partial-summary-required

C#styleno fixdefault: offcsharp/stylecop

Reports a documentation comment of a partial type or method that has no <summary> or <content> (and no <inheritdoc />). Each part is checked on its own. No fix.

The summary is the part of the comment that tools show in a list or a hover. A comment of a partial type without it is shown with no description.

To fix, add a <summary>.

Reported
...
public override string ToString() => "";
}
/// <remarks>Partial without summary.</remarks>
public partial class PartialNoSummary { }
/// <summary></summary>
...
/// <content>Content.</content>
...
public partial class PartialDefault { }
/// <remarks>Internal partial.</remarks>
internal partial struct PartialInternal { }
...
csharp:
lint:
rules:
doc-partial-summary-required: warn # off (default), warn, error

Enabled by the presets: csharp/stylecop.

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

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
StyleCop SA1605 partial each part of a partial type or method needs its own summary here; StyleCop reads the same per-part comment, but SA1601’s cross-part acceptance is not available (see SA1601)