Skip to content

Commit 171cffa

Browse files
Potential fix for pull request finding 'Missed opportunity to use Where'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent b0d9ffd commit 171cffa

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Analyzers/Activities/FunctionNotFoundAnalyzer.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,9 @@ static bool IsSystemAssembly(IAssemblySymbol assembly)
396396
return true;
397397
}
398398

399-
foreach (string prefix in SystemAssemblyPrefixes)
399+
if (SystemAssemblyPrefixes.Any(prefix => assemblyName.StartsWith(prefix, StringComparison.Ordinal)))
400400
{
401-
if (assemblyName.StartsWith(prefix, StringComparison.Ordinal))
402-
{
403-
return true;
404-
}
401+
return true;
405402
}
406403

407404
return false;

0 commit comments

Comments
 (0)