From 1f70ddc656d161c29e1bf7e398f1add102086d97 Mon Sep 17 00:00:00 2001 From: Andrew Valencik Date: Sun, 10 Apr 2022 11:27:27 -0400 Subject: [PATCH 1/2] Update scalafmt to 3.5.1 Update scalafmt config to most closely match previous setup --- .scalafmt.conf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 7bc7c404..47d1d318 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,8 +1,14 @@ -version = "2.7.5" +version = "3.5.1" + assumeStandardLibraryStripMargin = true -docstrings = JavaDoc + +// Docstring wrapping breaks doctests +docstrings.wrap = false +docstrings.style = Asterisk + project.git=true project.excludeFilters = [ ".*scala-3*" "LinesSuite.scala" ] +runner.dialect = scala212 From dd219355741a70c52ef740ce8402109cbd2db825 Mon Sep 17 00:00:00 2001 From: Andrew Valencik Date: Sun, 10 Apr 2022 11:28:45 -0400 Subject: [PATCH 2/2] Apply new scalafmt (3.5.1) --- .../shared/src/main/scala/munit/ScalaCheckSuite.scala | 11 ++++++----- munit/shared/src/main/scala/munit/Location.scala | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/munit-scalacheck/shared/src/main/scala/munit/ScalaCheckSuite.scala b/munit-scalacheck/shared/src/main/scala/munit/ScalaCheckSuite.scala index 30a94856..2678896a 100644 --- a/munit-scalacheck/shared/src/main/scala/munit/ScalaCheckSuite.scala +++ b/munit-scalacheck/shared/src/main/scala/munit/ScalaCheckSuite.scala @@ -70,11 +70,12 @@ trait ScalaCheckSuite extends FunSuite { if (r.passed) { resultMessage } else { - val seedMessage = s"""|Failing seed: ${initialSeed.toBase64} - |You can reproduce this failure by adding the following override to your suite: - | - | override val scalaCheckInitialSeed = "${initialSeed.toBase64}" - |""".stripMargin + val seedMessage = + s"""|Failing seed: ${initialSeed.toBase64} + |You can reproduce this failure by adding the following override to your suite: + | + | override val scalaCheckInitialSeed = "${initialSeed.toBase64}" + |""".stripMargin seedMessage + "\n" + resultMessage } } diff --git a/munit/shared/src/main/scala/munit/Location.scala b/munit/shared/src/main/scala/munit/Location.scala index 037ec04b..ca0fd517 100644 --- a/munit/shared/src/main/scala/munit/Location.scala +++ b/munit/shared/src/main/scala/munit/Location.scala @@ -29,7 +29,7 @@ final class Location( obj.asInstanceOf[AnyRef].eq(this) || (obj match { case l: Location => l.path == path && - l.line == line + l.line == line case _ => false })