Skip to content

Commit

Permalink
Merge pull request #201 from alexcardell/update/sbt-scalafix-0.13.0
Browse files Browse the repository at this point in the history
Update sbt-scalafix, scalafix-core to 0.13.0
  • Loading branch information
armanbilge authored Dec 18, 2024
2 parents 086e665 + 66d5999 commit afec225
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -98,23 +98,23 @@ 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)
case Term.Block(stats) =>
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)
case Template.Initial(_, _, _, stats) =>
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
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit afec225

Please sign in to comment.