BRO1511: Element documentation headers should not be followed by blank line¶
A documentation comment sits directly on the element it documents. Replaces StyleCop SA1506.
Example¶
Before¶
public class Order
{
/// <summary>Gets the total.</summary>
public decimal Total { get; set; }
}
After¶
public class Order
{
/// <summary>Gets the total.</summary>
public decimal Total { get; set; }
}
Why¶
A blank line after documentation detaches it from its element; readers can't tell what it belongs to.
How the fix works¶
The blank lines between the documentation and the element (or its first attribute) are removed.
Not reported¶
- A comment or directive between the documentation and the element.
Compared with StyleCop¶
Same positions and the same fixed output as StyleCop.