doc-typeparam-has-text
What it does
Section titled “What it does”Reports a <typeparam> without text (<typeparam name="T" /> counts as without text), in the documentation of a generic class, struct, interface, method or delegate. No fix.
Why it matters
Section titled “Why it matters”A type parameter with an empty description looks documented and says nothing about what T is for, and it stops tools from reporting the missing text.
To fix, describe the type parameter.
Example
Section titled “Example”.../// <typeparam name="T"></typeparam>/// <typeparam name="U" />/// <typeparam name="V">Good.</typeparam>public class Generic<T, U, V>{ /// <summary>Method.</summary> /// <typeparam name="X"></typeparam>... public void Method<X>() { }...}/// <summary>Struct.</summary>/// <typeparam name="T"></typeparam>public struct GenericStruct<T> { }/// <summary>Interface.</summary>...public interface IGeneric<T> { }/// <summary>Delegate.</summary>/// <typeparam name="T"></typeparam>/// <typeparam name="U" />public delegate void GenericCallback<T, U>();/// <summary>Partial.</summary>...Configuration
Section titled “Configuration”csharp: lint: rules: doc-typeparam-has-text: warn # off (default), warn, errorEnabled by the presets: csharp/stylecop.
Suppress one line with sudsy-disable-next-line doc-typeparam-has-text 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 | SA1622 |
full |