Find try { … } catch (e: Exception) { null } patterns

Proprietary

Swallowing every exception into null discards diagnostic information and conflates 'no value' with 'I lost the cause'. runCatching { } returns a Result<T> whose getOrNull() matches this shape, and onFailure { } keeps a hook for diagnostics.

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