Find .getOrThrow() calls on a Result<T>

Proprietary

Result.getOrThrow() unwraps success or rethrows the captured failure. If the call site does that immediately after runCatching { … }, the Result round-trip is pure ceremony — the same value with the same failure mode comes out of the bare expression. Prefer the bare expression, or use .fold(...) / .getOrElse { … } to actually do something with the failure.

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