You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is due to the implementation checking if the lambda is inside a direct descendant block of the loop:
privatestaticboolIsWithinLoopBody(SyntaxNodenode)=>
node.AncestorsAndSelf().Any(x => x isBlockSyntax&& x.Parent is ForStatementSyntax or ForEachStatementSyntax or WhileStatementSyntax or DoStatementSyntax);
Lambdas inside a loop without a direct block as a child are not reported by S6802:
This is due to the implementation checking if the lambda is inside a direct descendant block of the loop:
Repros have been added in #8387.
The text was updated successfully, but these errors were encountered: