Prefer pattern matching over isInstanceOf/asInstanceOf chains
ProprietaryFinds if statements that check isInstanceOf in the condition and use asInstanceOf in the then-part. Replace with pattern matching for idiomatic Scala.
org. openrewrite. scala. cleanup. PreferPatternMatchOverInstanceOfmod run . --recipe= org. openrewrite. scala. cleanup. PreferPatternMatchOverInstanceOfInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.