doc-comment-space
What it does
Section titled “What it does”Reports a documentation line (///) that does not start with a single space. More spaces are allowed to indent continuation lines, but not on the first line of the comment; a tab or no space is always reported. The fix writes the single space.
Why it matters
Section titled “Why it matters”The space after the slashes separates the marker from the text, so the text of a comment reads the same as a line of prose. A comment that starts at the slashes (///<summary>) is hard to read and differs from the rest of the file.
Example
Section titled “Example”... // int a; //tail /// <summary>x</summary> ///<summary>y</summary> /// <summary>z</summary> /* */ int b;...... // int a; //tail /// <summary>x</summary> /// <summary>y</summary> /// <summary>z</summary> /* */ int b;...Configuration
Section titled “Configuration”csharp: lint: rules: doc-comment-space: warn # off (default), warn, errorEnabled by the presets: csharp/stylecop.
Suppress one line with sudsy-disable-next-line doc-comment-space in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| StyleCop | SA1004 |
full |