Combine LINQ methods

Proprietary

Combine .Where(predicate).First() and similar patterns into .First(predicate), and consecutive .Where().Where() calls into a single .Where() with a combined predicate. Eliminating intermediate LINQ calls improves readability.

OpenRewrite.Recipes.CSharp.CodeQuality.Linq.CombineLinqMethods
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Linq.CombineLinqMethods

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.