From 2f69912cbcbd12447d5e9e9b04dcc7ce1e42d23e Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 12:19:00 +0000 Subject: [PATCH 1/3] Update scalafmt-core to 3.10.5 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 8ec24185..317062c8 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.10.1" +version = "3.10.5" runner.dialect=scala213source3 From b4c247c1d4a39b652926ab86f98a49f5a3ed32b8 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 12:19:05 +0000 Subject: [PATCH 2/3] Reformat with scalafmt 3.10.5 Executed command: scalafmt --non-interactive --- build.sbt | 73 +++++++++++-------- .../scala-2/weaver/SourceLocationMacro.scala | 3 +- .../src/main/scala/weaver/Formatter.scala | 10 ++- .../shared/src/main/scala/weaver/Runner.scala | 16 ++-- .../shared/src/main/scala/weaver/suites.scala | 3 +- .../jvm/src/test/scala/MetaJVM.scala | 9 ++- scalafix/build.sbt | 12 ++- .../src/main/scala/fix/AddClueToExpect.scala | 6 +- .../src/main/scala/fix/RemoveTagged.scala | 15 +++- ...ssertionExceptionToExpectationFailed.scala | 12 ++- .../rules/src/main/scala/fix/v0_11_0.scala | 29 ++++++-- ...tionExceptionToExpectationFailedTest.scala | 10 ++- ...tionExceptionToExpectationFailedTest.scala | 10 ++- .../main/scala/fix/AddClueToExpectTest.scala | 4 +- .../main/scala/fix/RewriteExpectTest.scala | 10 +-- .../main/scala/fix/AddClueToExpectTest.scala | 13 ++-- .../main/scala/fix/RewriteExpectTest.scala | 38 +++++----- 17 files changed, 169 insertions(+), 104 deletions(-) diff --git a/build.sbt b/build.sbt index 516913c2..9d3b70c8 100644 --- a/build.sbt +++ b/build.sbt @@ -72,8 +72,11 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform) "co.fs2" %%% "fs2-core" % Version.fs2, "org.typelevel" %%% "cats-effect" % Version.catsEffect, // https://github.com/portable-scala/portable-scala-reflect/issues/23 - "org.portable-scala" %%% "portable-scala-reflect" % Version.portableReflect cross CrossVersion.for3Use2_13, - "org.typelevel" %% "scalac-compat-annotation" % Version.scalacCompatAnnotation, + "org.portable-scala" %%% + "portable-scala-reflect" % Version.portableReflect cross + CrossVersion.for3Use2_13, + "org.typelevel" %% "scalac-compat-annotation" % + Version.scalacCompatAnnotation, "org.scalameta" %%% "munit-diff" % Version.munitDiff, if (scalaVersion.value.startsWith("3.")) "org.scala-lang" % "scala-reflect" % scala213 @@ -95,7 +98,9 @@ lazy val munitDiffShadingSettings = Seq( lazy val coreJVM = core.jvm .settings( libraryDependencies ++= Seq( - "org.scala-js" %%% "scalajs-stubs" % Version.scalajsStubs % "provided" cross CrossVersion.for3Use2_13, + "org.scala-js" %%% + "scalajs-stubs" % Version.scalajsStubs % "provided" cross + CrossVersion.for3Use2_13, "junit" % "junit" % Version.junit % Optional ), munitDiffShadingSettings @@ -117,15 +122,18 @@ lazy val framework = crossProject(JVMPlatform, JSPlatform, NativePlatform) lazy val frameworkJVM = framework.jvm .settings( libraryDependencies ++= Seq( - "org.scala-sbt" % "test-interface" % Version.testInterface, - "org.scala-js" %%% "scalajs-stubs" % Version.scalajsStubs % "provided" cross CrossVersion.for3Use2_13 + "org.scala-sbt" % "test-interface" % Version.testInterface, + "org.scala-js" %%% + "scalajs-stubs" % Version.scalajsStubs % "provided" cross + CrossVersion.for3Use2_13 ) ) lazy val frameworkJS = framework.js .settings( libraryDependencies ++= Seq( - "org.scala-js" %% "scalajs-test-interface" % scalaJSVersion cross CrossVersion.for3Use2_13 + "org.scala-js" %% "scalajs-test-interface" % scalaJSVersion cross + CrossVersion.for3Use2_13 ) ) @@ -149,7 +157,8 @@ lazy val coreCats = crossProject(JVMPlatform, JSPlatform, NativePlatform) lazy val coreCatsJS = coreCats.js .settings( libraryDependencies ++= Seq( - "org.scala-js" %%% "scala-js-macrotask-executor" % Version.scalajsMacroTask) + "org.scala-js" %%% "scala-js-macrotask-executor" % + Version.scalajsMacroTask) ) lazy val cats = crossProject(JVMPlatform, JSPlatform, NativePlatform) @@ -161,7 +170,8 @@ lazy val cats = crossProject(JVMPlatform, JSPlatform, NativePlatform) ) lazy val catsJVM = cats.jvm .settings( - libraryDependencies += "com.siriusxm" %% "snapshot4s-core" % Version.snapshot4s % Test + libraryDependencies += + "com.siriusxm" %% "snapshot4s-core" % Version.snapshot4s % Test ) .enablePlugins(Snapshot4sPlugin) @@ -235,28 +245,31 @@ lazy val docs = project "org.http4s" %% "http4s-ember-client" % Version.http4s, "org.typelevel" %% "cats-laws" % Version.catsLaws ), - tlSiteHelium ~= (_.site.internalCSS(Root / "assets") - .site.landingPage( - logo = Some(Image.internal(Root / "assets/logo.png")), - title = Some("Weaver"), - subtitle = Some("A test framework that runs everything in parallel."), - latestReleases = Seq( - ReleaseInfo("Upcoming Stable Release", "1.0.0") - ), - license = Some("Apache2"), - titleLinks = Seq( - VersionMenu.create(unversionedLabel = "Getting Started"), - LinkGroup.create( - IconLink.external("https://github.com/typelevel/weaver-test", - HeliumIcon.github), - IconLink.external("https://discord.gg/XF3CXcMzqD", HeliumIcon.chat) + tlSiteHelium ~= + (_.site.internalCSS(Root / "assets") + .site.landingPage( + logo = Some(Image.internal(Root / "assets/logo.png")), + title = Some("Weaver"), + subtitle = Some("A test framework that runs everything in parallel."), + latestReleases = Seq( + ReleaseInfo("Upcoming Stable Release", "1.0.0") + ), + license = Some("Apache2"), + titleLinks = Seq( + VersionMenu.create(unversionedLabel = "Getting Started"), + LinkGroup.create( + IconLink.external("https://github.com/typelevel/weaver-test", + HeliumIcon.github), + IconLink.external("https://discord.gg/XF3CXcMzqD", + HeliumIcon.chat) + ) + ), + documentationLinks = Seq( + TextLink.internal(Root / "overview/installation.md", + "Installation"), + TextLink.internal(Root / "features/expectations.md", + "Expectations (Assertions)") ) - ), - documentationLinks = Seq( - TextLink.internal(Root / "overview/installation.md", "Installation"), - TextLink.internal(Root / "features/expectations.md", - "Expectations (Assertions)") - ) - )), + )), laikaConfig ~= (_.withRawContent) ) diff --git a/modules/core/shared/src/main/scala-2/weaver/SourceLocationMacro.scala b/modules/core/shared/src/main/scala-2/weaver/SourceLocationMacro.scala index f841b944..55d8cd10 100644 --- a/modules/core/shared/src/main/scala-2/weaver/SourceLocationMacro.scala +++ b/modules/core/shared/src/main/scala-2/weaver/SourceLocationMacro.scala @@ -44,7 +44,8 @@ object macros { // Comparing roots to workaround a Windows-specific behaviour // https://github.com/disneystreaming/weaver-test/issues/364 val rp = - if (!abstractFile.isVirtual && (pwd.getRoot() == abstractFile.file.toPath().getRoot())) { + if (!abstractFile.isVirtual && + (pwd.getRoot() == abstractFile.file.toPath().getRoot())) { pwd.relativize(abstractFile.file.toPath()).toString() } else p diff --git a/modules/core/shared/src/main/scala/weaver/Formatter.scala b/modules/core/shared/src/main/scala/weaver/Formatter.scala index 5f981372..c6f69872 100644 --- a/modules/core/shared/src/main/scala/weaver/Formatter.scala +++ b/modules/core/shared/src/main/scala/weaver/Formatter.scala @@ -33,9 +33,10 @@ object Formatter { tabulatedTestLines match { case (_, firstLine) :: Nil => newPrefix + withDuration(firstLine) case (_, firstLine) :: extraLines => - newPrefix + withDuration(firstLine) + EOL + extraLines - .map(l => l._1.prefix + l._2) - .mkString(EOL) + newPrefix + withDuration(firstLine) + EOL + + extraLines + .map(l => l._1.prefix + l._2) + .mkString(EOL) case Nil => newPrefix + "" } } @@ -66,7 +67,8 @@ object Formatter { val newLine = '\n' builder.append(formatResultStatus(name, result, outcome.duration)) - if ((mode == Verbose && outcome.status.isFailed) || (mode == Summary && !outcome.status.isFailed)) + if ((mode == Verbose && outcome.status.isFailed) || + (mode == Summary && !outcome.status.isFailed)) result.formatted.foreach { resultInfo => builder.append(EOL) builder.append(resultInfo) diff --git a/modules/core/shared/src/main/scala/weaver/Runner.scala b/modules/core/shared/src/main/scala/weaver/Runner.scala index a9acd41a..598dea1a 100644 --- a/modules/core/shared/src/main/scala/weaver/Runner.scala +++ b/modules/core/shared/src/main/scala/weaver/Runner.scala @@ -84,13 +84,15 @@ class Runner[F[_]: Async]( outcome => for { failures <- buffer.get - _ <- (printLine(red(stars) + "FAILURES" + red(stars)) *> failures - .traverse[F, Unit] { specEvent => - printLine(cyan(specEvent.name)) *> - specEvent.events.traverse(printTestEvent(Verbose)) *> - newLine - } - .void).whenA(failures.nonEmpty) + _ <- + (printLine(red(stars) + "FAILURES" + red(stars)) *> + failures + .traverse[F, Unit] { specEvent => + printLine(cyan(specEvent.name)) *> + specEvent.events.traverse(printTestEvent(Verbose)) *> + newLine + } + .void).whenA(failures.nonEmpty) _ <- printLine(outcome.formatted) } yield outcome } diff --git a/modules/core/shared/src/main/scala/weaver/suites.scala b/modules/core/shared/src/main/scala/weaver/suites.scala index ce4ea30c..078960a9 100644 --- a/modules/core/shared/src/main/scala/weaver/suites.scala +++ b/modules/core/shared/src/main/scala/weaver/suites.scala @@ -92,7 +92,8 @@ abstract class RunnableSuite[F[_]] extends EffectSuite[F] { val argsFilter = Filters.filterTests(this.name)(args) val testsIgnored = - testsTaggedOnlyAndIgnored ++ testsNotTaggedOnlyAndIgnored // "foo".only.ignore and "foo".ignore + testsTaggedOnlyAndIgnored ++ + testsNotTaggedOnlyAndIgnored // "foo".only.ignore and "foo".ignore val (filteredTests, filteredOutTests) = testsNotTaggedOnlyAndNotIgnored.partition { diff --git a/modules/framework-cats/jvm/src/test/scala/MetaJVM.scala b/modules/framework-cats/jvm/src/test/scala/MetaJVM.scala index 958e18dd..7bcc84e9 100644 --- a/modules/framework-cats/jvm/src/test/scala/MetaJVM.scala +++ b/modules/framework-cats/jvm/src/test/scala/MetaJVM.scala @@ -120,8 +120,10 @@ object MetaJVM { state.getState(parallelWait = true).map { case (initialised, finalised, totalUses, localUses) => expect.all( - initialised == 1, // resource is initialised only once and uses in parallel - finalised == 0, // resource is not finalised until all parallel uses are completed + initialised == + 1, // resource is initialised only once and uses in parallel + finalised == + 0, // resource is not finalised until all parallel uses are completed totalUses >= 1, totalUses <= 3, localUses >= 1, @@ -146,7 +148,8 @@ object MetaJVM { state.getState(parallelWait = false).map { case (initialised, finalised, totalUses, localUses) => expect.all( - initialised == totalUses, // lazy resource will get initialised for each suite + initialised == + totalUses, // lazy resource will get initialised for each suite finalised == totalUses - 1, localUses == 1 // one test for each inialisation ) diff --git a/scalafix/build.sbt b/scalafix/build.sbt index c00581da..41daec63 100644 --- a/scalafix/build.sbt +++ b/scalafix/build.sbt @@ -14,7 +14,8 @@ inThisBuild( ), semanticdbEnabled := true, semanticdbVersion := scalafixSemanticdb.revision, - resolvers += "Sonatype central snapshots" at "https://central.sonatype.com/repository/maven-snapshots", + resolvers += "Sonatype central snapshots" at + "https://central.sonatype.com/repository/maven-snapshots", scalacOptions += "-deprecation" ) ) @@ -36,7 +37,8 @@ lazy val `weaver-test` = (project in file(".")) lazy val rules = projectMatrix .settings( moduleName := "scalafix", - libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % V.scalafixVersion + libraryDependencies += + "ch.epfl.scala" %% "scalafix-core" % V.scalafixVersion ) .defaultAxes(VirtualAxis.jvm) .jvmPlatform(rulesCrossVersions) @@ -56,11 +58,13 @@ lazy val v0_9_0_tests = makeTests("v0_9_0", v0_9_0_input, v0_9_0_output) lazy val v0_11_0_input = makeInput("v0_11_0", "org.typelevel" %% "weaver-cats" % "0.10.1") lazy val v0_11_0_output = - makeOutput("v0_11_0", "org.typelevel" %% "weaver-cats" % "0.11-799b8e6-SNAPSHOT") + makeOutput("v0_11_0", + "org.typelevel" %% "weaver-cats" % "0.11-799b8e6-SNAPSHOT") lazy val v0_11_0_tests = makeTests("v0_11_0", v0_11_0_input, v0_11_0_output) lazy val testsAggregate = Project("tests", file("target/testsAggregate")) - .aggregate(v0_8_3_tests.projectRefs ++ v0_9_0_tests.projectRefs ++ v0_11_0_tests.projectRefs: _*) + .aggregate(v0_8_3_tests.projectRefs ++ v0_9_0_tests.projectRefs ++ + v0_11_0_tests.projectRefs: _*) .settings( publish / skip := true ) diff --git a/scalafix/rules/src/main/scala/fix/AddClueToExpect.scala b/scalafix/rules/src/main/scala/fix/AddClueToExpect.scala index 68af3a6d..88555400 100644 --- a/scalafix/rules/src/main/scala/fix/AddClueToExpect.scala +++ b/scalafix/rules/src/main/scala/fix/AddClueToExpect.scala @@ -24,10 +24,10 @@ class AddClueToExpect extends SemanticRule("AddClueToExpect") { private def makeClue(expr: Term)(implicit doc: SemanticDocument): Term = { expr match { - case _: Term.Name => q"clue($expr)" - case _: Term.Apply => q"clue($expr)" + case _: Term.Name => q"clue($expr)" + case _: Term.Apply => q"clue($expr)" case _: Term.Select => q"clue($expr)" - case _ => expr + case _ => expr } } diff --git a/scalafix/rules/src/main/scala/fix/RemoveTagged.scala b/scalafix/rules/src/main/scala/fix/RemoveTagged.scala index fec008b3..4d134296 100644 --- a/scalafix/rules/src/main/scala/fix/RemoveTagged.scala +++ b/scalafix/rules/src/main/scala/fix/RemoveTagged.scala @@ -6,13 +6,20 @@ class RemoveTagged extends SemanticRule("RemoveTagged") { override def fix(implicit doc: SemanticDocument): Patch = { val taggedMethod = - SymbolMatcher.normalized("weaver/Expectations.Helpers#StringOps#tagged().") + SymbolMatcher.normalized( + "weaver/Expectations.Helpers#StringOps#tagged().") doc.tree.collect { - case tree @ Term.Apply.After_4_6_0(Term.Select(testName, taggedMethod(_)), Term.ArgClause(List(Lit.String("ignore")), None)) => + case tree @ Term.Apply.After_4_6_0( + Term.Select(testName, taggedMethod(_)), + Term.ArgClause(List(Lit.String("ignore")), None)) => Patch.replaceTree(tree, q"$testName.ignore".toString) - case tree @ Term.Apply.After_4_6_0(Term.Select(testName, taggedMethod(_)), Term.ArgClause(List(Lit.String("only")), None)) => + case tree @ Term.Apply.After_4_6_0( + Term.Select(testName, taggedMethod(_)), + Term.ArgClause(List(Lit.String("only")), None)) => Patch.replaceTree(tree, q"$testName.only".toString) - case tree @ Term.Apply.After_4_6_0(Term.Select(testName, taggedMethod(_)), Term.ArgClause(List(Lit.String(other)), None)) => + case tree @ Term.Apply.After_4_6_0( + Term.Select(testName, taggedMethod(_)), + Term.ArgClause(List(Lit.String(other)), None)) => Patch.replaceTree(tree, s"$testName") }.asPatch } diff --git a/scalafix/rules/src/main/scala/fix/RenameAssertionExceptionToExpectationFailed.scala b/scalafix/rules/src/main/scala/fix/RenameAssertionExceptionToExpectationFailed.scala index 5efadfda..d447ec8b 100644 --- a/scalafix/rules/src/main/scala/fix/RenameAssertionExceptionToExpectationFailed.scala +++ b/scalafix/rules/src/main/scala/fix/RenameAssertionExceptionToExpectationFailed.scala @@ -2,16 +2,20 @@ package fix import scalafix.v1._ import scala.meta._ -class RenameAssertionExceptionToExpectationFailed extends SemanticRule("RenameAssertionExceptionToExpectationFailed") { +class RenameAssertionExceptionToExpectationFailed + extends SemanticRule("RenameAssertionExceptionToExpectationFailed") { override def fix(implicit doc: SemanticDocument): Patch = { val symbol = SymbolMatcher.normalized("weaver/AssertionException") doc.tree.collect { case symbol(tree) => tree match { - case q"AssertionException" => Patch.replaceTree(tree, s"new ExpectationFailed") - case t"AssertionException" => Patch.replaceTree(tree, s"ExpectationFailed") - case importee"AssertionException" => Patch.replaceTree(tree, s"ExpectationFailed") + case q"AssertionException" => + Patch.replaceTree(tree, s"new ExpectationFailed") + case t"AssertionException" => + Patch.replaceTree(tree, s"ExpectationFailed") + case importee"AssertionException" => + Patch.replaceTree(tree, s"ExpectationFailed") case _ => Patch.empty } }.asPatch diff --git a/scalafix/rules/src/main/scala/fix/v0_11_0.scala b/scalafix/rules/src/main/scala/fix/v0_11_0.scala index bf5f752a..18ed1eaa 100644 --- a/scalafix/rules/src/main/scala/fix/v0_11_0.scala +++ b/scalafix/rules/src/main/scala/fix/v0_11_0.scala @@ -5,7 +5,10 @@ import scala.meta._ class v0_11_0 extends SemanticRule("v0_11_0") { override def fix(implicit doc: SemanticDocument): Patch = - List(renameCancelToIgnore, renameAssertionException, removeTagged, renameVerify).asPatch + List(renameCancelToIgnore, + renameAssertionException, + removeTagged, + renameVerify).asPatch def renameCancelToIgnore(implicit doc: SemanticDocument): Patch = { val cancelMethod = @@ -26,9 +29,12 @@ class v0_11_0 extends SemanticRule("v0_11_0") { doc.tree.collect { case symbol(tree) => tree match { - case q"AssertionException" => Patch.replaceTree(tree, s"new ExpectationFailed") - case t"AssertionException" => Patch.replaceTree(tree, s"ExpectationFailed") - case importee"AssertionException" => Patch.replaceTree(tree, s"ExpectationFailed") + case q"AssertionException" => + Patch.replaceTree(tree, s"new ExpectationFailed") + case t"AssertionException" => + Patch.replaceTree(tree, s"ExpectationFailed") + case importee"AssertionException" => + Patch.replaceTree(tree, s"ExpectationFailed") case _ => Patch.empty } }.asPatch @@ -36,13 +42,20 @@ class v0_11_0 extends SemanticRule("v0_11_0") { def removeTagged(implicit doc: SemanticDocument): Patch = { val taggedMethod = - SymbolMatcher.normalized("weaver/Expectations.Helpers#StringOps#tagged().") + SymbolMatcher.normalized( + "weaver/Expectations.Helpers#StringOps#tagged().") doc.tree.collect { - case tree @ Term.Apply.After_4_6_0(Term.Select(testName, taggedMethod(_)), Term.ArgClause(List(Lit.String("ignore")), None)) => + case tree @ Term.Apply.After_4_6_0( + Term.Select(testName, taggedMethod(_)), + Term.ArgClause(List(Lit.String("ignore")), None)) => Patch.replaceTree(tree, q"$testName.ignore".toString) - case tree @ Term.Apply.After_4_6_0(Term.Select(testName, taggedMethod(_)), Term.ArgClause(List(Lit.String("only")), None)) => + case tree @ Term.Apply.After_4_6_0( + Term.Select(testName, taggedMethod(_)), + Term.ArgClause(List(Lit.String("only")), None)) => Patch.replaceTree(tree, q"$testName.only".toString) - case tree @ Term.Apply.After_4_6_0(Term.Select(testName, taggedMethod(_)), Term.ArgClause(List(Lit.String(other)), None)) => + case tree @ Term.Apply.After_4_6_0( + Term.Select(testName, taggedMethod(_)), + Term.ArgClause(List(Lit.String(other)), None)) => Patch.replaceTree(tree, s"$testName") }.asPatch } diff --git a/scalafix/v0_11_0/input/src/main/scala/fix/RenameAssertionExceptionToExpectationFailedTest.scala b/scalafix/v0_11_0/input/src/main/scala/fix/RenameAssertionExceptionToExpectationFailedTest.scala index 6ff5c5b1..4154e94e 100644 --- a/scalafix/v0_11_0/input/src/main/scala/fix/RenameAssertionExceptionToExpectationFailedTest.scala +++ b/scalafix/v0_11_0/input/src/main/scala/fix/RenameAssertionExceptionToExpectationFailedTest.scala @@ -9,19 +9,23 @@ import cats.effect.IO object RenameAssertionExceptionToExpectationFailed extends SimpleIOSuite { test("raise") { - IO.raiseError(AssertionException("some reason", NonEmptyList.of(implicitly[SourceLocation]))).as(success) + IO.raiseError(AssertionException( + "some reason", + NonEmptyList.of(implicitly[SourceLocation]))).as(success) } test("match") { val program: IO[Unit] = IO.unit program.attemptTap { case Left(ex: AssertionException) => IO.println(ex) - case _ => IO.unit + case _ => IO.unit }.as(success) } test("import") { import weaver.AssertionException - IO.raiseError(AssertionException("some reason", NonEmptyList.of(implicitly[SourceLocation]))).as(success) + IO.raiseError(AssertionException( + "some reason", + NonEmptyList.of(implicitly[SourceLocation]))).as(success) } } diff --git a/scalafix/v0_11_0/output/src/main/scala/fix/RenameAssertionExceptionToExpectationFailedTest.scala b/scalafix/v0_11_0/output/src/main/scala/fix/RenameAssertionExceptionToExpectationFailedTest.scala index 5c7e5d0f..0c2b92b1 100644 --- a/scalafix/v0_11_0/output/src/main/scala/fix/RenameAssertionExceptionToExpectationFailedTest.scala +++ b/scalafix/v0_11_0/output/src/main/scala/fix/RenameAssertionExceptionToExpectationFailedTest.scala @@ -6,19 +6,23 @@ import cats.effect.IO object RenameAssertionExceptionToExpectationFailed extends SimpleIOSuite { test("raise") { - IO.raiseError(new ExpectationFailed("some reason", NonEmptyList.of(implicitly[SourceLocation]))).as(success) + IO.raiseError(new ExpectationFailed( + "some reason", + NonEmptyList.of(implicitly[SourceLocation]))).as(success) } test("match") { val program: IO[Unit] = IO.unit program.attemptTap { case Left(ex: ExpectationFailed) => IO.println(ex) - case _ => IO.unit + case _ => IO.unit }.as(success) } test("import") { import weaver.ExpectationFailed - IO.raiseError(new ExpectationFailed("some reason", NonEmptyList.of(implicitly[SourceLocation]))).as(success) + IO.raiseError(new ExpectationFailed( + "some reason", + NonEmptyList.of(implicitly[SourceLocation]))).as(success) } } diff --git a/scalafix/v0_9_0/input/src/main/scala/fix/AddClueToExpectTest.scala b/scalafix/v0_9_0/input/src/main/scala/fix/AddClueToExpectTest.scala index 76825a9f..41d172f2 100644 --- a/scalafix/v0_9_0/input/src/main/scala/fix/AddClueToExpectTest.scala +++ b/scalafix/v0_9_0/input/src/main/scala/fix/AddClueToExpectTest.scala @@ -44,7 +44,7 @@ object AddClueToExpectTest extends SimpleIOSuite { expect(!a.isInstanceOf[Int]) } - pureTest("select"){ + pureTest("select") { val either = Left[Int, Int](1) expect(either.toOption.isEmpty) } @@ -79,7 +79,7 @@ object AddClueToExpectTest extends SimpleIOSuite { } pureTest("ignore blocks") { - expect(Some(1).fold(true)({_ => b == c })) + expect(Some(1).fold(true)({ _ => b == c })) } } diff --git a/scalafix/v0_9_0/input/src/main/scala/fix/RewriteExpectTest.scala b/scalafix/v0_9_0/input/src/main/scala/fix/RewriteExpectTest.scala index 12a48682..53d781e9 100644 --- a/scalafix/v0_9_0/input/src/main/scala/fix/RewriteExpectTest.scala +++ b/scalafix/v0_9_0/input/src/main/scala/fix/RewriteExpectTest.scala @@ -97,7 +97,7 @@ object RewriteExpectTest extends SimpleIOSuite { pureTest("infer order with sealed traits") { sealed trait Pet object Pet { - case object Cat extends Pet + case object Cat extends Pet case class Dog(friend: Pet) extends Pet } val petCat = Pet.Cat @@ -107,10 +107,10 @@ object RewriteExpectTest extends SimpleIOSuite { pureTest("infer order with common names") { val expectedId = 1 - val actualId = 2 + val actualId = 2 val obtainedId = 3 - val result = 4 - expect(result == expectedId && actualId == expectedId && obtainedId == expectedId) + val result = 4 + expect(result == expectedId && actualId == expectedId && + obtainedId == expectedId) } } - diff --git a/scalafix/v0_9_0/output/src/main/scala/fix/AddClueToExpectTest.scala b/scalafix/v0_9_0/output/src/main/scala/fix/AddClueToExpectTest.scala index 3a8fc90d..072dfaf1 100644 --- a/scalafix/v0_9_0/output/src/main/scala/fix/AddClueToExpectTest.scala +++ b/scalafix/v0_9_0/output/src/main/scala/fix/AddClueToExpectTest.scala @@ -8,7 +8,8 @@ object AddClueToExpectTest extends SimpleIOSuite { val c: Int = 3 pureTest("multiple") { - expect(clue(a) == clue(b)) and expect(clue(b) == clue(c)) && not(expect(clue(c) == clue(a))) + expect(clue(a) == clue(b)) and + expect(clue(b) == clue(c)) && not(expect(clue(c) == clue(a))) } pureTest("infix") { @@ -41,7 +42,7 @@ object AddClueToExpectTest extends SimpleIOSuite { expect(!clue(a).isInstanceOf[Int]) } - pureTest("select"){ + pureTest("select") { val either = Left[Int, Int](1) expect(clue(either.toOption).isEmpty) } @@ -64,7 +65,9 @@ object AddClueToExpectTest extends SimpleIOSuite { pureTest("all") { def isGreater(a: Int, b: Int, c: Int): Boolean = a > b && b > c - expect.all(clue(a) == clue(b), clue(Some(2)).nonEmpty, isGreater(clue(a), clue(b), clue(c))) + expect.all(clue(a) == clue(b), + clue(Some(2)).nonEmpty, + isGreater(clue(a), clue(b), clue(c))) } pureTest("ignore clue in expect.all") { @@ -77,8 +80,8 @@ object AddClueToExpectTest extends SimpleIOSuite { pureTest("ignore blocks") { expect(clue(Some(1)).fold(true) { - _ => b == c -}) + _ => b == c + }) } } diff --git a/scalafix/v0_9_0/output/src/main/scala/fix/RewriteExpectTest.scala b/scalafix/v0_9_0/output/src/main/scala/fix/RewriteExpectTest.scala index 494387e7..a45864d9 100644 --- a/scalafix/v0_9_0/output/src/main/scala/fix/RewriteExpectTest.scala +++ b/scalafix/v0_9_0/output/src/main/scala/fix/RewriteExpectTest.scala @@ -13,7 +13,8 @@ object RewriteExpectTest extends SimpleIOSuite { } pureTest("nested ==") { - expect.same(1, 1).and(expect.same(2, 2)) and expect.same(1, 1).and(expect(2 >= 2)) + expect.same(1, 1).and(expect.same(2, 2)) and + expect.same(1, 1).and(expect(2 >= 2)) } pureTest("===") { @@ -37,27 +38,28 @@ object RewriteExpectTest extends SimpleIOSuite { } pureTest("if then else if") { - if (1 == 2) expect(3 > 4) else if (2 == 3) expect.same(5, 5) else expect(4 > 3) + if (1 == 2) expect(3 > 4) + else if (2 == 3) expect.same(5, 5) else expect(4 > 3) } pureTest("match") { val n: Int = 1 n match { - case 2 => - expect(1 > 2) - case 3 => - success - case 4 => - failure("Assertion failed") -} + case 2 => + expect(1 > 2) + case 3 => + success + case 4 => + failure("Assertion failed") + } } pureTest("match with wildcard false") { val n: Int = 1 matches(n) { - case 2 => - expect(1 > 2) -} + case 2 => + expect(1 > 2) + } } pureTest("expect.all ==") { @@ -77,7 +79,8 @@ object RewriteExpectTest extends SimpleIOSuite { } pureTest("expect.all with || and &&") { - expect(1 > 0).and(expect.same(2, 2)).and(expect(2 > 0).or(expect(3 > 4))).and(expect.same(2, 2)) + expect(1 > 0).and(expect.same(2, 2)).and(expect(2 > 0).or(expect(3 > + 4))).and(expect.same(2, 2)) } pureTest("expect.all ignore clue") { @@ -97,7 +100,7 @@ object RewriteExpectTest extends SimpleIOSuite { pureTest("infer order with sealed traits") { sealed trait Pet object Pet { - case object Cat extends Pet + case object Cat extends Pet case class Dog(friend: Pet) extends Pet } val petCat = Pet.Cat @@ -107,9 +110,10 @@ object RewriteExpectTest extends SimpleIOSuite { pureTest("infer order with common names") { val expectedId = 1 - val actualId = 2 + val actualId = 2 val obtainedId = 3 - val result = 4 - expect.same(expectedId, result).and(expect.same(expectedId, actualId)).and(expect.same(expectedId, obtainedId)) + val result = 4 + expect.same(expectedId, result).and(expect.same(expectedId, actualId)).and( + expect.same(expectedId, obtainedId)) } } From fa4d56c4565368a53c1133d96844a74f664dfa69 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 12:19:05 +0000 Subject: [PATCH 3/3] Add 'Reformat with scalafmt 3.10.5' to .git-blame-ignore-revs --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 3842600e..6a9dd8a4 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -6,3 +6,6 @@ # Scala Steward: Reformat with scalafmt 3.9.10 1d6b2d8f534c6fa2ede2e46c872e09f7704bdbed + +# Scala Steward: Reformat with scalafmt 3.10.5 +b4c247c1d4a39b652926ab86f98a49f5a3ed32b8