Find BigDecimal("...") allocations inside loops

Proprietary

Parsing a BigDecimal from a String literal inside a loop reparses the same value every iteration. Hoist the literal BigDecimal out of the loop or use a cached constant.

org.openrewrite.kotlin.performance.FindBigDecimalFromStringInLoops$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.performance.FindBigDecimalFromStringInLoops$KtRecipe'

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