From 2e397801d2d556a41dd2347813f93e0cae656a24 Mon Sep 17 00:00:00 2001 From: Karel Cemus Date: Sun, 5 May 2024 21:54:27 +0200 Subject: [PATCH] Fixed a warning custom release plugin --- build.sbt | 5 ++--- project/CustomReleasePlugin.scala | 2 +- src/test/scala/play/api/cache/redis/RecoveryPolicySpec.scala | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index 70230c6..888a280 100644 --- a/build.sbt +++ b/build.sbt @@ -54,9 +54,8 @@ Test / fork := true Test / test := (Test / testOnly).toTask(" * -- -l \"org.scalatest.Ignore\"").value Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-oF") -semanticdbEnabled := true -semanticdbVersion := scalafixSemanticdb.revision -ThisBuild / scalafixScalaBinaryVersion := CrossVersion.binaryScalaVersion(scalaVersion.value) +semanticdbEnabled := true +semanticdbVersion := scalafixSemanticdb.revision wartremoverWarnings ++= Warts.allBut( Wart.Any, diff --git a/project/CustomReleasePlugin.scala b/project/CustomReleasePlugin.scala index 110a3c3..d0d3d7f 100644 --- a/project/CustomReleasePlugin.scala +++ b/project/CustomReleasePlugin.scala @@ -60,7 +60,7 @@ object CustomReleasePlugin extends AutoPlugin { val nextVersion = st.extracted.runTask(releaseVersion, st)._2(currentV) val bump = Version.Bump.Minor - val suggestedReleaseV: String = Version(nextVersion).map(_.bump(bump).string).getOrElse(versionFormatError(currentV)) + val suggestedReleaseV: String = Version(nextVersion).map(_.bump(bump).unapply).getOrElse(versionFormatError(currentV)) st.log.info("Press enter to use the default value") diff --git a/src/test/scala/play/api/cache/redis/RecoveryPolicySpec.scala b/src/test/scala/play/api/cache/redis/RecoveryPolicySpec.scala index 0ae7c97..0b3ffdc 100644 --- a/src/test/scala/play/api/cache/redis/RecoveryPolicySpec.scala +++ b/src/test/scala/play/api/cache/redis/RecoveryPolicySpec.scala @@ -4,6 +4,7 @@ import play.api.Logger import play.api.cache.redis.test._ import scala.concurrent.Future +import scala.util.control.NoStackTrace class RecoveryPolicySpec extends AsyncUnitSpec { @@ -11,7 +12,7 @@ class RecoveryPolicySpec extends AsyncUnitSpec { private val default = Future.successful(0) private object ex { - private val internal = new IllegalArgumentException("Simulated Internal cause") + private val internal = new IllegalArgumentException("Simulated Internal cause") with NoStackTrace val unexpectedAny: UnexpectedResponseException = UnexpectedResponseException(None, "TEST-CMD") val unexpectedKey: UnexpectedResponseException = UnexpectedResponseException(Some("some key"), "TEST-CMD") val failedAny: ExecutionFailedException = ExecutionFailedException(None, "TEST-CMD", "TEST-CMD", internal)