diff --git a/build.sbt b/build.sbt index 1b3cd76..b5a5dc9 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,4 @@ -ThisBuild / tlBaseVersion := "0.3" +ThisBuild / tlBaseVersion := "0.4" ThisBuild / crossScalaVersions := Seq(V.scala213, V.scala212) ThisBuild / scalaVersion := (ThisBuild / crossScalaVersions).value.head diff --git a/modules/cats-effect/rules/src/main/scala/org/typelevel/fix/IORandomUUID.scala b/modules/cats-effect/rules/src/main/scala/org/typelevel/fix/IORandomUUID.scala index f354def..0fdf312 100644 --- a/modules/cats-effect/rules/src/main/scala/org/typelevel/fix/IORandomUUID.scala +++ b/modules/cats-effect/rules/src/main/scala/org/typelevel/fix/IORandomUUID.scala @@ -60,7 +60,7 @@ class IORandomUUID extends SemanticRule("TypelevelIORandomUUID") { checkDiscardedStat(expr) case Template.Initial(_, _, _, stats) => stats.map(checkDiscardedStat).asPatch - case Term.ForYield(enums, _) => + case Term.ForYield.After_4_9_9(enums, _) => enums.collect { case Enumerator.Generator(_, rhs) => checkDiscardedStat(rhs) diff --git a/modules/cats-effect/rules/src/main/scala/org/typelevel/fix/UnusedIO.scala b/modules/cats-effect/rules/src/main/scala/org/typelevel/fix/UnusedIO.scala index 2be97af..e1624ce 100644 --- a/modules/cats-effect/rules/src/main/scala/org/typelevel/fix/UnusedIO.scala +++ b/modules/cats-effect/rules/src/main/scala/org/typelevel/fix/UnusedIO.scala @@ -69,7 +69,7 @@ class UnusedIO extends SemanticRule("TypelevelUnusedIO") { checkInner(expr) case Term.Tuple(args) => args.map(arg => checkSignature(arg, arg)).asPatch - case Term.Try(expr, catchCases, _) => + case Term.Try.After_4_9_9(expr, catchCases, _) => checkInner(expr) ++ catchCases.collect { case Case(_, _, consequent) => checkInner(consequent) } @@ -98,7 +98,7 @@ class UnusedIO extends SemanticRule("TypelevelUnusedIO") { def checkTree(tree: Tree)(implicit doc: SemanticDocument ): Patch = tree.collect { - case Term.For(_, body) => + case Term.For.After_4_9_9(_, body) => checkDiscardedStat(body) case Term.While(_, body) => checkDiscardedStat(body) @@ -106,7 +106,7 @@ class UnusedIO extends SemanticRule("TypelevelUnusedIO") { stats.dropRight(1).map(checkDiscardedStat).asPatch case Term.Interpolate(_, _, args) => args.map(checkDiscardedStat).asPatch - case Term.Try(_, _, Some(finalizer)) => + case Term.Try.After_4_9_9(_, _, Some(finalizer)) => checkDiscardedStat(finalizer) case Term.TryWithHandler(_, _, Some(finalizer)) => checkDiscardedStat(finalizer) @@ -114,7 +114,7 @@ class UnusedIO extends SemanticRule("TypelevelUnusedIO") { stats.map(checkDiscardedStat).asPatch case Ctor.Secondary.Initial(_, _, _, _, stats) => stats.map(checkDiscardedStat).asPatch - case Term.ForYield(enums, _) => + case Term.ForYield.After_4_9_9(enums, _) => enums.collect { case Enumerator.Val(Pat.Wildcard(), rhs) => checkDiscardedStat(rhs) }.asPatch diff --git a/project/plugins.sbt b/project/plugins.sbt index b225760..67bf7c9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1,2 @@ -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.13.0") addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.7.4")