From e06dae05d164b20ae480cd949ceae9697184f1d4 Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Sun, 3 Mar 2024 08:43:56 +0900 Subject: [PATCH] add imports. prepare Scala 2.13.13 --- rules/src/main/scala/fix/RemoveSamePackageImport.scala | 3 +++ rules/src/main/scala/fix/ScalazEitherInfix.scala | 2 ++ rules/src/main/scala/fix/ThrowableToNonFatal.scala | 3 +++ 3 files changed, 8 insertions(+) diff --git a/rules/src/main/scala/fix/RemoveSamePackageImport.scala b/rules/src/main/scala/fix/RemoveSamePackageImport.scala index 289facc..db4dc00 100644 --- a/rules/src/main/scala/fix/RemoveSamePackageImport.scala +++ b/rules/src/main/scala/fix/RemoveSamePackageImport.scala @@ -2,9 +2,12 @@ package fix import scala.meta.Importee import scala.meta.Pkg +import scala.meta.transversers._ import scalafix.Patch import scalafix.v1.SyntacticDocument import scalafix.v1.SyntacticRule +import scalafix.v1.XtensionOptionPatch +import scalafix.v1.XtensionSeqPatch class RemoveSamePackageImport extends SyntacticRule("RemoveSamePackageImport") { diff --git a/rules/src/main/scala/fix/ScalazEitherInfix.scala b/rules/src/main/scala/fix/ScalazEitherInfix.scala index 823eb0b..c628ada 100644 --- a/rules/src/main/scala/fix/ScalazEitherInfix.scala +++ b/rules/src/main/scala/fix/ScalazEitherInfix.scala @@ -1,9 +1,11 @@ package fix import scala.meta.Type +import scala.meta.transversers._ import scalafix.Patch import scalafix.v1.SemanticDocument import scalafix.v1.SemanticRule +import scalafix.v1.XtensionSeqPatch import scalafix.v1.XtensionTreeScalafix class ScalazEitherInfix extends SemanticRule("ScalazEitherInfix") { diff --git a/rules/src/main/scala/fix/ThrowableToNonFatal.scala b/rules/src/main/scala/fix/ThrowableToNonFatal.scala index be8a29e..7dd7392 100644 --- a/rules/src/main/scala/fix/ThrowableToNonFatal.scala +++ b/rules/src/main/scala/fix/ThrowableToNonFatal.scala @@ -4,9 +4,12 @@ import scala.meta.Case import scala.meta.Pat import scala.meta.Type import scala.meta.XtensionQuasiquoteImporter +import scala.meta.prettyprinters._ +import scala.meta.transversers._ import scalafix.Patch import scalafix.v1.SemanticDocument import scalafix.v1.SemanticRule +import scalafix.v1.XtensionSeqPatch class ThrowableToNonFatal extends SemanticRule("ThrowableToNonFatal") { override def fix(implicit doc: SemanticDocument): Patch = {