Prefer pattern matching over asInstanceOf casts
ProprietaryFinds .asInstanceOf[T] type casts that should be replaced with pattern matching. Idiomatic Scala prefers pattern matching over explicit casts.
org. openrewrite. scala. cleanup. PreferPatternMatchmod run . --recipe= org. openrewrite. scala. cleanup. PreferPatternMatchInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.