doc-text-ends-with-period
What it does
Section titled “What it does”Reports the last text of an element of a documentation comment that does not end with a period (. or .)). Each paragraph of <para> and <note> is checked. A paragraph that ends in a colon (except the last), -or- and <seealso> are not reported, and an inline element (<see />, <c>, …) at the end counts as not ending with a period. The fix adds the period, or replaces a trailing comma or semicolon with it.
Why it matters
Section titled “Why it matters”Documentation is read as sentences in the generated reference, where the elements are shown one below the other. Text with and without the final period looks uneven, and the missing period is the first thing that shows that a sentence was not finished.
Example
Section titled “Example”using System;/// <summary>Interface</summary>public interface IFace{ /// <summary>Member</summary> void Run();}/// <summary>Record</summary>public record Record(int A);using System;/// <summary>Interface.</summary>public interface IFace{ /// <summary>Member.</summary> void Run();}/// <summary>Record.</summary>public record Record(int A);Configuration
Section titled “Configuration”csharp: lint: rules: doc-text-ends-with-period: warn # off (default), warn, errorEnabled by the presets: csharp/stylecop.
Suppress one line with sudsy-disable-next-line doc-text-ends-with-period 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 | SA1629 |
full |