BRO1005: Documentation lines should begin with single space¶
Each /// documentation line has exactly one space before its text. Replaces StyleCop SA1004.
Example¶
Before¶
/// <summary>
///Creates an order.
/// </summary>
/// <remarks>Orders start empty.</remarks>
public class Order
{
}
After¶
/// <summary>
/// Creates an order.
/// </summary>
/// <remarks>Orders start empty.</remarks>
public class Order
{
}
Why¶
Documentation reads like prose; a line without the space or with extra indentation looks like a typo, and lines line up only when they all start the same way.
How the fix works¶
A missing space after /// is added. Several spaces are reduced to one before a top-level tag (/// <remarks>), like StyleCop; indented text and nested tags inside an element are fine, and so are lines with nothing after /// and lines inside <code>, where indentation is part of the example.
Compared with StyleCop¶
Same positions and the same fixed output as StyleCop.