Skip to content

Commit

Permalink
remove transversers import if wildcard
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Mar 18, 2024
1 parent c9ca076 commit ccc527c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 10 additions & 2 deletions core/src/main/scala/scalameta_ast/ScalametaAST.scala
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,12 @@ class ScalametaAST {
val p = patchCode(patch)
val imports = List[List[String]](
p.imports,
if (wildcardImport) {
Nil
} else {
List("scala.meta.transversers._")
},
List(
"scala.meta.transversers._",
"scalafix.Patch",
"scalafix.v1.SyntacticDocument",
"scalafix.v1.SyntacticRule",
Expand Down Expand Up @@ -574,8 +578,12 @@ class ScalametaAST {
val p = patchCode(patch)
val imports = List[List[String]](
p.imports,
if (wildcardImport) {
Nil
} else {
List("scala.meta.transversers._")
},
List(
"scala.meta.transversers._",
"scalafix.Patch",
"scalafix.v1.SemanticDocument",
"scalafix.v1.SemanticRule",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ abstract class IntegrationTest(
assert(
diff == List(
("import scala.meta._", "import scala.meta.*"),
("import scala.meta.transversers._", "import scala.meta.transversers.*"),
)
)
}
Expand Down

0 comments on commit ccc527c

Please sign in to comment.