Skip to content

Commit 03003e1

Browse files
committed
Remove unnecessary check for FixableDiagnosticIds
1 parent 9636fdb commit 03003e1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

DocumentationAnalyzers/DocumentationAnalyzers.CodeFixes/StyleRules/DOC103CodeFixProvider.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace DocumentationAnalyzers.StyleRules
55
{
66
using System.Collections.Immutable;
77
using System.Composition;
8+
using System.Diagnostics;
89
using System.Net;
910
using System.Threading;
1011
using System.Threading.Tasks;
@@ -32,10 +33,7 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context)
3233

3334
foreach (var diagnostic in context.Diagnostics)
3435
{
35-
if (!FixableDiagnosticIds.Contains(diagnostic.Id))
36-
{
37-
continue;
38-
}
36+
Debug.Assert(FixableDiagnosticIds.Contains(diagnostic.Id), "Assertion failed: FixableDiagnosticIds.Contains(diagnostic.Id)");
3937

4038
SyntaxToken token = root.FindToken(diagnostic.Location.SourceSpan.Start, findInsideTrivia: true);
4139
if (!token.IsKind(SyntaxKind.XmlEntityLiteralToken))

0 commit comments

Comments
 (0)