Skip to content

doc-value-text

C#styleno fixdefault: offcsharp/stylecop

Reports a property’s <value> without text (<value></value>; <value /> is not reported). A comment with <inheritdoc /> is not reported. No fix.

An empty <value> is a placeholder: it satisfies a check that the tag exists and gives the reader nothing about what the property holds.

To fix, describe the value.

Reported
...
{
/// <summary>Gets the value.</summary>
/// <value></value>
public int EmptyValue { get; }
/// <summary>Gets the value.</summary>
/// <value />
public int SelfClosingValue { get; }
...
/// <summary>Gets the value.</summary>
/// <value>
/// </value>
public int BlankValue { get; }
/// <summary>Gets the value.</summary>
/// <value></value>
/// <inheritdoc />
...
csharp:
lint:
rules:
doc-value-text: warn # off (default), warn, error

Enabled by the presets: csharp/stylecop.

Suppress one line with sudsy-disable-next-line doc-value-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
StyleCop SA1610 full