Skip to content

BRO1609: Do not use placeholder elements

Documentation doesn't contain <placeholder> elements. Replaces StyleCop SA1651.

Example

Before

public class Cache
{
    /// <summary><placeholder>Clears the cache.</placeholder></summary>
    public void Clear()
    {
    }
}

After

public class Cache
{
    /// <summary>Clears the cache.</summary>
    public void Clear()
    {
    }
}

Why

Some tools generate documentation wrapped in <placeholder> to mark it as not reviewed yet. Once it's checked in, the marker is noise.

How the fix works

The <placeholder> tags are removed and their text stays, like StyleCop's fix. If the text isn't right, the fix can't know that: read it when you review the change.

This rule reads documentation as XML, which needs <GenerateDocumentationFile>true</GenerateDocumentationFile>.

Not reported

A <placeholder> at the top level of a comment, outside any element such as <summary>: unwrapping it would leave its text outside every element.

Compared with StyleCop

Same results and fixed output as StyleCop, except the top-level <placeholder> above, which StyleCop reports and unwraps.