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
sebastien-marichal
changed the title
New rule S6802: Using lambda expressions in loops should be avoided
New rule S6802: Using lambda expressions in loops should be avoided in Blazor markup section
Nov 3, 2023
@sebastien-marichal I think we may have a few FPs on mudblazor
In this scenario, the lambda applies to the collection being iterated, that is evaluated only once, and the @foreach is outer-most, as far as I can tell.
Same applies here and here.
I think the IsWithinLoop check is a bit too generic:
node.AncestorsAndSelf().Any(x =>xisForStatementSyntax or ForEachStatementSyntax or WhileStatementSyntax or DoStatementSyntax)
S6802: SonarSource/rspec#3215
The text was updated successfully, but these errors were encountered: