Use Try safely without calling .get

Proprietary

Finds calls to .get on scala.util.Try values that should use safer alternatives. Calling .get on a Failure throws the contained exception; prefer getOrElse, map, or pattern matching.

org.openrewrite.scala.errorhandling.UseTrySafely
mod run . --recipe=org.openrewrite.scala.errorhandling.UseTrySafely

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