Use Any() instead of Count() > 0
ProprietaryReplace .Count() > 0 with .Any(). Any() short-circuits after the first match, while Count() enumerates all elements.
OpenRewrite. Recipes. CSharp. CodeQuality. Linq. UseAnyInsteadOfCountmod run . --recipe= OpenRewrite. Recipes. CSharp. CodeQuality. Linq. UseAnyInsteadOfCountInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.