openrewrite / rewrite-kotlin

Work-in-progress implementation of Kotlin language support for OpenRewrite.
Apache License 2.0
38 stars 11 forks source link

Recipe - Move lambda argument outside of method invocation parens #544

Open nmck257 opened 6 months ago

nmck257 commented 6 months ago

What problem are you trying to solve?

Standard formatting

What precondition(s) should be checked before applying this recipe?

None?

Describe the situation before applying the recipe

val foo = 1.let({ it + 1 })

Describe the situation after applying the recipe

val foo = 1.let { it + 1 }

Have you considered any alternatives or workarounds?

Any additional context

I'm pretty sure this isn't already implemented (peeking at the cleanup, format, style packages), but I could have missed it

Are you interested in contributing this recipe to OpenRewrite?

Time permitting, sure -- it's not a critical priority for me, and I expect that core grammar enhancements are a bigger priority for the maintainers, so whoever gets there first