Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package fix
import scalafix.v1._
import scala.meta._
class v1_2_0 extends SemanticRule("v1_2_0") {
override def fix(implicit doc: SemanticDocument): Patch = {
doc.tree.collect {
case t @ Term.Select(Term.Select(Term.Select(Term.Name("_root_"), Term.Name("io")), Term.Name("chrisdavenport")), Term.Name("log4cats")) =>
Patch.replaceTree(t, "_root_.org.typelevel.log4cats")
case t @ Term.Select(Term.Select(Term.Name("io"), Term.Name("chrisdavenport")), Term.Name("log4cats")) =>
Patch.replaceTree(t, "org.typelevel.log4cats")
}.asPatch
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment