diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index c66531ab..7d3a1e01 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,2 +1,5 @@ # Scala Steward: Reformat with scalafmt 3.0.8 1b6e10ffeb6a994c3fe28b8ff87188bb17d29b82 + +# Scala Steward: Reformat with scalafmt 3.7.14 +f4253372ca2a606e879081470b19e1832c43ac51 diff --git a/.scalafmt.conf b/.scalafmt.conf index 7abf2f02..9a18da2a 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.0.8" +version = "3.7.14" maxColumn = 120 align.preset = most align.multiline = false diff --git a/zio-sbt-ci/src/main/scala/zio/sbt/ZioSbtCiPlugin.scala b/zio-sbt-ci/src/main/scala/zio/sbt/ZioSbtCiPlugin.scala index 33a94d7b..b3caedb4 100644 --- a/zio-sbt-ci/src/main/scala/zio/sbt/ZioSbtCiPlugin.scala +++ b/zio-sbt-ci/src/main/scala/zio/sbt/ZioSbtCiPlugin.scala @@ -151,8 +151,8 @@ object ZioSbtCiPlugin extends AutoPlugin { val GroupTests = { def makeTests(scalaVersion: String) = s" ${scalaVersionMatrix.filter { case (_, versions) => - versions.contains(scalaVersion) - }.map(e => e._1 + "/test").mkString(" ")}" + versions.contains(scalaVersion) + }.map(e => e._1 + "/test").mkString(" ")}" Job( id = "test", @@ -561,7 +561,7 @@ object ZioSbtCiPlugin extends AutoPlugin { IO.write(new File(s".github/workflows/${ciWorkflowName.value.toLowerCase}.yml"), template) } - override lazy val buildSettings: Seq[Setting[_]] = { + override lazy val buildSettings: Seq[Setting[_]] = Seq( ciWorkflowName := "CI", ciEnabledBranches := Seq.empty, @@ -613,7 +613,6 @@ object ZioSbtCiPlugin extends AutoPlugin { }.value, ciReleaseApprovalJobs := Seq("ci") ) - } abstract class DocsVersioning(val npmCommand: String) object DocsVersioning { diff --git a/zio-sbt-ecosystem/src/main/scala/zio/sbt/ZioSbtEcosystemPlugin.scala b/zio-sbt-ecosystem/src/main/scala/zio/sbt/ZioSbtEcosystemPlugin.scala index 0da1f111..27778ebe 100644 --- a/zio-sbt-ecosystem/src/main/scala/zio/sbt/ZioSbtEcosystemPlugin.scala +++ b/zio-sbt-ecosystem/src/main/scala/zio/sbt/ZioSbtEcosystemPlugin.scala @@ -88,9 +88,9 @@ object ZioSbtEcosystemPlugin extends AutoPlugin { s"""|${Banner.trueColor(s"${name.value} v.${version.value}")} |Useful sbt tasks: |${usefulTasksAndSettings.value.map { case (task, description) => - s"${item(task)} ${normalizedPadding(task)}${description}" - } - .mkString("\n")} + s"${item(task)} ${normalizedPadding(task)}${description}" + } + .mkString("\n")} """.stripMargin } else "" diff --git a/zio-sbt-website/src/main/scala/zio/sbt/WebsitePlugin.scala b/zio-sbt-website/src/main/scala/zio/sbt/WebsitePlugin.scala index f1378476..747e3c22 100644 --- a/zio-sbt-website/src/main/scala/zio/sbt/WebsitePlugin.scala +++ b/zio-sbt-website/src/main/scala/zio/sbt/WebsitePlugin.scala @@ -335,7 +335,7 @@ object WebsitePlugin extends sbt.AutoPlugin { } } - lazy val generateReadmeTask: Def.Initialize[Task[Unit]] = { + lazy val generateReadmeTask: Def.Initialize[Task[Unit]] = Def.task { import zio.* @@ -374,7 +374,6 @@ object WebsitePlugin extends sbt.AutoPlugin { logger.info("The new README.md file generated") } - } lazy val checkReadmeTask: Def.Initialize[Task[Unit]] = Def.task { diff --git a/zio-sbt-website/src/main/scala/zio/sbt/WebsiteUtils.scala b/zio-sbt-website/src/main/scala/zio/sbt/WebsiteUtils.scala index bed25e3a..7e486764 100644 --- a/zio-sbt-website/src/main/scala/zio/sbt/WebsiteUtils.scala +++ b/zio-sbt-website/src/main/scala/zio/sbt/WebsiteUtils.scala @@ -163,10 +163,11 @@ object WebsiteUtils { } def releaseVersion(logger: String => Unit): Option[String] = - try "git tag --sort=committerdate".!!.split("\n") - .filter(_.startsWith("v")) - .lastOption - .map(_.tail) // without the leading v char + try + "git tag --sort=committerdate".!!.split("\n") + .filter(_.startsWith("v")) + .lastOption + .map(_.tail) // without the leading v char catch { case _: Exception => logger(