doc-text-not-empty
What it does
Section titled “What it does”Reports a <remarks>, <example>, <exception> or <permission> element without text, written <remarks></remarks> or <remarks />. No fix.
Why it matters
Section titled “Why it matters”An empty element is shown as a heading with nothing below it in the generated documentation, so it adds noise and hides that the text was never written.
To fix, write the text or delete the element.
Example
Section titled “Example”...{ /// <summary>Text.</summary> /// <remarks></remarks> /// <example /> /// <exception cref="System.Exception"></exception> /// <exception cref="System.ArgumentException">Thrown.</exception> /// <permission cref="System.Security.PermissionSet" /> /// <remarks> /// </remarks>... /// <summary> /// Text. /// <remarks></remarks> /// </summary> public void Nested() { } /// <remarks></remarks> int Hidden;... public int Cref; /// <remarks><!-- comment --></remarks> public int Comment;}...{ /// <summary>Text.</summary> /// <remarks></remarks> /// <example /> /// <exception cref="System.Exception"></exception> /// <exception cref="System.ArgumentException">Thrown.</exception> /// <permission cref="System.Security.PermissionSet" /> /// <remarks> /// </remarks>... /// <summary> /// Text. /// <remarks></remarks> /// </summary> public void Nested() { } /// <remarks></remarks> int Hidden;... public int Cref; /// <remarks><!-- comment --></remarks> public int Comment;}Configuration
Section titled “Configuration”csharp: lint: rules: doc-text-not-empty: warn # off (default), warn, errorEnabled by the presets: csharp/stylecop.
Suppress one line with sudsy-disable-next-line doc-text-not-empty 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 | SA1627 |
full |