Find takeUnless { !p } (double-negative) patterns

Proprietary

takeUnless { !p } is takeIf { p } written with a double negative. Inverting takeUnless's predicate to positive form makes the intent immediate.

org.openrewrite.kotlin.idiom.FindTakeUnlessNegated$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.idiom.FindTakeUnlessNegated$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.