Skip to content

Commit dd6ead1

Browse files
committed
Improve comment in IsLocalReferenceInsideChildLoop
1 parent a756ad1 commit dd6ead1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Performance/AvoidSingleUseOfLocalJsonSerializerOptions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ private static bool IsLocalUsedAsArgumentForJsonSerializerOnly(IObjectCreationOp
103103
continue;
104104
}
105105

106-
// Symbol is declared in a parent scope, so this implies that options are re-used.
106+
// Symbol is declared in a parent scope and referenced inside a loop,
107+
// this implies that options are used more than once.
107108
if (IsLocalReferenceInsideChildLoop(localRefOperation, localBlock!))
108109
{
109110
return false;

0 commit comments

Comments
 (0)