no-duplicate-doc-text
What it does
Section titled “What it does”Reports two elements of one documentation comment with the same text (a <param> pasted twice, for example). Empty elements and “The parameter is not used.” are not reported. No fix.
Why it matters
Section titled “Why it matters”Two parameters described in the same words is almost always a copy and paste that was not edited, so one of the descriptions is wrong.
To fix, write the right text for each element.
Example
Section titled “Example”... /// <summary>The value.</summary> /// <param name="a">The value.</param> /// <param name="b">The value.</param> /// <param name="c">The parameter is not used.</param>... /// <summary>The value.</summary> /// <remarks>The /// value.</remarks>... /// <summary>Inline <see cref="Duplicates"/> text.</summary> /// <remarks>Inline <see cref="Duplicates"/> text.</remarks> /// <seealso cref="Duplicates"/> /// <seealso cref="Duplicates"/> public void Inline() { } /// <summary>Same.</summary> /// <summary>Same.</summary> public void TwoSummaries() { }... /// <inheritdoc /> /// <inheritdoc /> public void Inherited() { }...Configuration
Section titled “Configuration”csharp: lint: rules: no-duplicate-doc-text: warn # off (default), warn, errorEnabled by the presets: csharp/stylecop.
Suppress one line with sudsy-disable-next-line no-duplicate-doc-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 | SA1625 |
full |