diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..dab64f2 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Scala Steward: Reformat with scalafmt 3.8.3 +5cde0aed9209ba4f4d81bc19f2af65744d16811f diff --git a/.scalafmt.conf b/.scalafmt.conf index d2becd8..8f5b0f6 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.8.1 +version = 3.8.3 runner.dialect = scala213source3 project.git = true maxColumn = 120 diff --git a/itest/src/custom-rule/build.sc b/itest/src/custom-rule/build.sc index dd94346..d78a7c7 100644 --- a/itest/src/custom-rule/build.sc +++ b/itest/src/custom-rule/build.sc @@ -5,8 +5,9 @@ import mill.scalalib._ import os._ object project extends ScalaModule with ScalafixModule { - def scalaVersion = "2.12.17" - def semanticDbEnablePluginScalacOptions = super.semanticDbEnablePluginScalacOptions() ++ Seq("-P:semanticdb:synthetics:on") + def scalaVersion = "2.12.17" + def semanticDbEnablePluginScalacOptions = + super.semanticDbEnablePluginScalacOptions() ++ Seq("-P:semanticdb:synthetics:on") def scalafixIvyDeps = Agg(ivy"org.scala-lang.modules::scala-collection-migrations:2.12.0") } diff --git a/itest/src/custom-rule/project/src/Fix.scala b/itest/src/custom-rule/project/src/Fix.scala index bd4ec6f..89dc5ba 100644 --- a/itest/src/custom-rule/project/src/Fix.scala +++ b/itest/src/custom-rule/project/src/Fix.scala @@ -3,8 +3,8 @@ object Tuple2ZippedSrc213 { def zipped(xs: List[Int], ys: List[Int]): Unit = { (xs, ys).zipped (xs, ys).zipped - ((xs, ys) zipped) - ((xs, ys).zipped) + (xs, ys).zipped + (xs, ys).zipped (xs, ys).zipped /* a */ ( /* b */ xs /* c */, /* d */ ys /* e */ ) /* f */ . /* g */ zipped /* h */ diff --git a/itest/src/fix-2.12/build.sc b/itest/src/fix-2.12/build.sc index 21dd5f5..a26e953 100644 --- a/itest/src/fix-2.12/build.sc +++ b/itest/src/fix-2.12/build.sc @@ -7,7 +7,7 @@ import os._ object project extends ScalaModule with ScalafixModule { def scalaVersion = "2.12.17" def scalacOptions = Seq("-Ywarn-unused") - def ivyDeps = Agg(ivy"org.scala-lang.modules::scala-collection-compat:2.12.0") + def ivyDeps = Agg(ivy"org.scala-lang.modules::scala-collection-compat:2.12.0") } def verify() = diff --git a/itest/src/fix-3.5/build.sc b/itest/src/fix-3.5/build.sc index 1902c8e..283a68d 100644 --- a/itest/src/fix-3.5/build.sc +++ b/itest/src/fix-3.5/build.sc @@ -11,11 +11,12 @@ object project extends ScalaModule with ScalafixModule { def verify() = T.command { val fixedScala = read(pwd / "project" / "src" / "Fix.scala") - val expected = """object Fix { - | // use a 3.5.x-only feature to fail if a Scala 3 LTS compiler is used - | // https://www.scala-lang.org/blog/2024/08/22/scala-3.5.0-released.html#support-for-binary-integer-literals - | def myComplexMethod: Map[Int, String] = 1.to(0B1010).map(i => i -> i.toString).toMap - |} - |""".stripMargin + val expected = + """object Fix { + | // use a 3.5.x-only feature to fail if a Scala 3 LTS compiler is used + | // https://www.scala-lang.org/blog/2024/08/22/scala-3.5.0-released.html#support-for-binary-integer-literals + | def myComplexMethod: Map[Int, String] = 1.to(0B1010).map(i => i -> i.toString).toMap + |} + |""".stripMargin assert(fixedScala == expected) } diff --git a/itest/src/fix-3.5/project/src/Fix.scala b/itest/src/fix-3.5/project/src/Fix.scala index 015479f..26c845c 100644 --- a/itest/src/fix-3.5/project/src/Fix.scala +++ b/itest/src/fix-3.5/project/src/Fix.scala @@ -1,5 +1,5 @@ object Fix { - // use a 3.5.x-only feature to fail if a Scala 3 LTS compiler is used - // https://www.scala-lang.org/blog/2024/08/22/scala-3.5.0-released.html#support-for-binary-integer-literals + // use a 3.5.x-only feature to fail if a Scala 3 LTS compiler is used + // https://www.scala-lang.org/blog/2024/08/22/scala-3.5.0-released.html#support-for-binary-integer-literals def myComplexMethod = 1.to(0B1010).map(i => i -> i.toString).toMap } diff --git a/itest/src/fix/build.sc b/itest/src/fix/build.sc index e64d549..6ba1fb3 100644 --- a/itest/src/fix/build.sc +++ b/itest/src/fix/build.sc @@ -5,9 +5,9 @@ import mill.scalalib._ import os._ object project extends ScalaModule with ScalafixModule { - def scalaVersion = "2.13.12" + def scalaVersion = "2.13.12" def scalafixScalaBinaryVersion = mill.scalalib.api.ZincWorkerUtil.scalaBinaryVersion(scalaVersion()) - def scalacOptions = Seq("-Ywarn-unused") + def scalacOptions = Seq("-Ywarn-unused") } def verify() =