Find closure in GetOrAdd/AddOrUpdate factory

Proprietary

Detect closures in lambdas passed to GetOrAdd or AddOrUpdate. Use the factory overload that accepts a state argument to avoid allocations.

OpenRewrite.Recipes.CSharp.CodeQuality.Performance.FindAvoidClosureInMethod
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Performance.FindAvoidClosureInMethod

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