doc-typeparam-has-name
What it does
Section titled “What it does”Reports a <typeparam> without a name attribute, or with an empty one, in the documentation of a generic class, struct, interface, method or delegate. No fix.
Why it matters
Section titled “Why it matters”The name connects the text to a type parameter. Without it the tag is not shown with its parameter.
To fix, add name="T".
Example
Section titled “Example”using System.Threading.Tasks;/// <summary>Generic.</summary>/// <typeparam>No name.</typeparam>/// <typeparam name="">Empty name.</typeparam>.../// <typeparam name="V">Good.</typeparam>...{ /// <summary>Method.</summary>... /// <typeparam>No name.</typeparam> public void Method<X>() { } /// <summary>Method.</summary> /// <typeparam name="X"></typeparam>...public struct GenericStruct<T> { }/// <summary>Interface.</summary>/// <typeparam>T</typeparam>public interface IGeneric<T> { }/// <summary>Delegate.</summary>...Configuration
Section titled “Configuration”csharp: lint: rules: doc-typeparam-has-name: warn # off (default), warn, errorEnabled by the presets: csharp/stylecop.
Suppress one line with sudsy-disable-next-line doc-typeparam-has-name 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 | SA1621 |
full |