diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index f6f1e649e..a3faa9763 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -3,3 +3,6 @@ aa7db3a42121f78a5b3bed3658786c1cef83efe8 # Enable scalafmt for Scala 3 64df4ae51873593a789af5848bd225c14d0baf8a + +# Scala Steward: Reformat with scalafmt 3.7.4 +fcff0321302ad8a301837c2a99dd0d423c12ab90 diff --git a/.scalafmt.conf b/.scalafmt.conf index 243e75f0e..e7937db99 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.6.1" +version = "3.7.4" style = default maxColumn = 100 diff --git a/build.sbt b/build.sbt index 74fe2a9b7..179837f28 100644 --- a/build.sbt +++ b/build.sbt @@ -139,7 +139,7 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform) .in(file("core")) .settings(commonSettings) .settings( - name := "scala-java-time", + name := "scala-java-time", libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.2") .cross(CrossVersion.for3Use2_13) ) diff --git a/core/shared/src/main/scala-2/org/threeten/bp/zone/ZoneMap.scala b/core/shared/src/main/scala-2/org/threeten/bp/zone/ZoneMap.scala index f4c6aa966..5e5a4267a 100644 --- a/core/shared/src/main/scala-2/org/threeten/bp/zone/ZoneMap.scala +++ b/core/shared/src/main/scala-2/org/threeten/bp/zone/ZoneMap.scala @@ -12,7 +12,7 @@ import scala.collection.immutable // TreeMap is not available in Scala.js however it is needed for Time Zone support // This is a simple implementation of NavigableMap, performance is likely terrible private[bp] class ZoneMap[K: ClassTag, V] private[bp] (var map: immutable.TreeMap[K, V])(implicit - ordering: Ordering[K] + ordering: Ordering[K] ) extends AbstractMap[K, V] with java.util.NavigableMap[K, V] { def this()(implicit ordering: Ordering[K]) = @@ -164,6 +164,6 @@ private[bp] class ZoneMap[K: ClassTag, V] private[bp] (var map: immutable.TreeMa object ZoneMap { def apply[K: ClassTag, V](map: immutable.TreeMap[K, V])(implicit - ordering: Ordering[K] + ordering: Ordering[K] ): java.util.NavigableMap[K, V] = new ZoneMap[K, V](map) } diff --git a/tests/shared/src/test/scala/org/threeten/bp/AssertionsHelper.scala b/tests/shared/src/test/scala/org/threeten/bp/AssertionsHelper.scala index 2961d4963..0b62baf4e 100644 --- a/tests/shared/src/test/scala/org/threeten/bp/AssertionsHelper.scala +++ b/tests/shared/src/test/scala/org/threeten/bp/AssertionsHelper.scala @@ -17,27 +17,27 @@ trait AssertionsHelper { this: AnyFunSuite => true def assertEquals[A, B]( - o1: A, - o2: B, - msg: String + o1: A, + o2: B, + msg: String )(implicit prettifier: Prettifier, pos: source.Position): Assertion = assert(o1 == o2, msg) def assertEquals[A, B]( - o1: A, - o2: B + o1: A, + o2: B )(implicit prettifier: Prettifier, pos: source.Position): Assertion = assert(o1 == o2) def assertSame[A <: AnyRef, B <: AnyRef]( - o1: A, - o2: B + o1: A, + o2: B )(implicit prettifier: Prettifier, pos: source.Position): Assertion = assert(o1 eq o2) def assertNotEquals[A, B]( - o1: A, - o2: B + o1: A, + o2: B )(implicit prettifier: Prettifier, pos: source.Position): Assertion = assert(o1 != o2) @@ -51,8 +51,8 @@ trait AssertionsHelper { this: AnyFunSuite => assert(a == null) def assertNotNull[A]( - a: A, - msg: String + a: A, + msg: String )(implicit prettifier: Prettifier, pos: source.Position): Assertion = assert(a != null, msg) diff --git a/tests/shared/src/test/scala/org/threeten/bp/TestInstant.scala b/tests/shared/src/test/scala/org/threeten/bp/TestInstant.scala index b263dbb18..f7ba88da0 100644 --- a/tests/shared/src/test/scala/org/threeten/bp/TestInstant.scala +++ b/tests/shared/src/test/scala/org/threeten/bp/TestInstant.scala @@ -244,27 +244,27 @@ class TestInstant List[Long](Long.MaxValue - 1, 0, (Long.MaxValue - 1) / 1000, - ((Long.MaxValue - 1) % 1000).toInt * 1000000 + ((Long.MaxValue - 1) % 1000).toInt * 1000000 ), List[Long](Long.MinValue, 0, (Long.MinValue / 1000) - 1, - (Long.MinValue % 1000).toInt * 1000000 + 1000000000 + (Long.MinValue % 1000).toInt * 1000000 + 1000000000 ), List[Long](Long.MinValue, 1, (Long.MinValue / 1000) - 1, - (Long.MinValue % 1000).toInt * 1000000 + 1000000000 + 1 + (Long.MinValue % 1000).toInt * 1000000 + 1000000000 + 1 ), List[Long](Long.MinValue + 1, 0, ((Long.MinValue + 1) / 1000) - 1, - ((Long.MinValue + 1) % 1000).toInt * 1000000 + 1000000000 + ((Long.MinValue + 1) % 1000).toInt * 1000000 + 1000000000 ), List[Long](Long.MinValue + 1, 1, ((Long.MinValue + 1) / 1000) - 1, - ((Long.MinValue + 1) % 1000).toInt * 1000000 + 1000000000 + 1 + ((Long.MinValue + 1) % 1000).toInt * 1000000 + 1000000000 + 1 ) ) @@ -730,7 +730,7 @@ class TestInstant 0, Long.MinValue, Long.MinValue / 1000 - 1, - (Long.MinValue % 1000).toInt * 1000000 + 1000000000 + (Long.MinValue % 1000).toInt * 1000000 + 1000000000 ) )