Skip to content

no-doc-placeholder

C#styleno fixdefault: offcsharp/stylecop

Reports a <placeholder> element in a documentation comment. No fix.

<placeholder> marks text that is to be filled in later, so a comment that has one is not finished.

To fix, write the text.

Reported
...
public class Placeholders
{
/// <summary>
/// <placeholder>todo</placeholder>
/// <placeholder />
/// </summary>
public void Placeholder() { }
/// <placeholder>todo</placeholder>
private int Hidden;
/// <summary>
/// <para><placeholder>nested</placeholder></para>
/// </summary>
public int Nested;
}
After the fix
...
public class Placeholders
{
/// <summary>
/// <placeholder>todo</placeholder>
/// <placeholder />
/// </summary>
public void Placeholder() { }
/// <placeholder>todo.</placeholder>
private int Hidden;
/// <summary>
/// <para><placeholder>nested</placeholder></para>
/// </summary>
public int Nested;
}
csharp:
lint:
rules:
no-doc-placeholder: warn # off (default), warn, error

Enabled by the presets: csharp/stylecop.

Suppress one line with sudsy-disable-next-line no-doc-placeholder 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 SA1651 full