CodeQL library for C#
codeql/csharp-all 0.6.2 ( changelog , source )
Search

Predicate missedAllOpportunity

Holds if foreach statement fes could be converted to a .All() call. That is, the ForeachStmt contains a single if with a condition that accesses the loop variable and with a body that assigns false to a variable and breaks out of the foreach.

Import path

import Linq.Helpers
predicate missedAllOpportunity ( ForeachStmt fes )