Skip to main content
ai-slop/csharp-redundant-doc-commentmanual fix

Redundant XML doc comment.

A one-line `/// <summary>Gets or sets the name.</summary>` that restates the member name. It documents nothing the signature does not already say.

Flagged shape and clean shape.

Each example shows the exact code shape the rule is looking for, then the smallest version that keeps the intent without hiding risk or adding noise.

csharp-redundant-doc-comment.cs
✗ Flagged
/// <summary>Gets or sets the timeout.</summary>
public int Timeout { get; set; }

/// <summary>Gets the name.</summary>
public string Name { get; }
Why this trips

Deterministic line match: flags a single-line `/// <summary>...</summary>` whose text starts with Gets, Sets, Gets or sets, The, A, or An and contains only words.

csharp-redundant-doc-comment.cs
✓ Clean
/// <summary>Request timeout in milliseconds; must be greater than zero.</summary>
public int Timeout { get; set; }

public string Name { get; }
What changed

Delete the boilerplate, or replace it with what the signature cannot say: units, invariants, valid ranges, or side effects.

Agents fill every public member with boilerplate XML docs to look thorough. The template text adds no meaning and drifts as members change.

How this rule is justified.

Rule id

ai-slop/csharp-redundant-doc-comment

Enforcing engine

ai-slop

Detector strategy

Deterministic line match: flags a single-line `/// <summary>...</summary>` whose text starts with Gets, Sets, Gets or sets, The, A, or An and contains only words.

Legitimate code that is NOT flagged

Summaries containing explanatory words such as because, since, must, when, unless, avoid, or note, summaries with other punctuation, and multi-line `<summary>` blocks are not flagged.

Evidence

Part of aislop's C# rule set. First-class C# support, including C#-specific AI-slop rules, arrived in aislop v0.14.1.