This is an automated email from the ASF dual-hosted git repository.

mdedetrich pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-projection.git

commit 91773246d2b08fe6349ed338034ea917bb34faa5
Author: Matthew de Detrich <[email protected]>
AuthorDate: Fri Mar 24 09:18:17 2023 +0100

    Update scalafmt
---
 .scalafmt.conf       | 62 ++++++++++++++++++++++++++++++++++++----------------
 build.sbt            | 10 ---------
 project/Common.scala |  2 --
 project/plugins.sbt  |  2 +-
 4 files changed, 44 insertions(+), 32 deletions(-)

diff --git a/.scalafmt.conf b/.scalafmt.conf
index 6d11f6a..1aae8a4 100644
--- a/.scalafmt.conf
+++ b/.scalafmt.conf
@@ -1,21 +1,40 @@
-version = 2.4.2
-
-style = defaultWithAlign
-
-docstrings                 = JavaDoc
-indentOperator             = spray
-maxColumn                  = 120
-rewrite.rules              = [RedundantParens, SortImports, AvoidInfix]
-unindentTopLevelOperators  = true
-align.tokens               = [{code = "=>", owner = "Case"}]
-align.openParenDefnSite    = false
-align.openParenCallSite    = false
-optIn.configStyleArguments = false
-danglingParentheses = false
-spaces.inImportCurlyBraces = true
-newlines.afterCurlyLambda = preserve
-
-rewrite.neverInfix.excludeFilters = [
+version                                  = 3.7.1
+runner.dialect                           = scala213
+project.git                              = true
+style                                    = defaultWithAlign
+docstrings.style                         = Asterisk
+docstrings.wrap                          = false
+indentOperator.preset                    = spray
+maxColumn                                = 120
+lineEndings                              = preserve
+rewrite.rules                            = [RedundantParens, SortImports, 
AvoidInfix]
+indentOperator.exemptScope               = all
+align.preset                             = some
+align.tokens."+"                         = [
+  {
+    code   = "~>"
+    owners = [
+      { regex = "Term.ApplyInfix" }
+    ]
+  }
+]
+literals.hexDigits                       = upper
+literals.hexPrefix                       = lower
+binPack.unsafeCallSite                   = always
+binPack.unsafeDefnSite                   = always
+binPack.indentCallSiteSingleArg          = false
+binPack.indentCallSiteOnce               = true
+newlines.avoidForSimpleOverflow          = [slc]
+newlines.source                          = keep
+newlines.beforeMultiline                 = keep
+align.openParenDefnSite                  = false
+align.openParenCallSite                  = false
+align.allowOverflow                      = true
+optIn.breakChainOnFirstMethodDot         = false
+optIn.configStyleArguments               = false
+danglingParentheses.preset               = false
+spaces.inImportCurlyBraces               = true
+rewrite.neverInfix.excludeFilters        = [
   and
   min
   max
@@ -45,9 +64,14 @@ rewrite.neverInfix.excludeFilters = [
   allElementsOf
   inOrderElementsOf
   theSameElementsAs
+  theSameElementsInOrderAs
 ]
-rewriteTokens = {
+rewriteTokens          = {
   "⇒": "=>"
   "→": "->"
   "←": "<-"
 }
+project.excludeFilters = [
+  "scripts/authors.scala"
+]
+project.layout         = StandardConvention
diff --git a/build.sbt b/build.sbt
index 4145c0c..ac06ec6 100644
--- a/build.sbt
+++ b/build.sbt
@@ -181,16 +181,6 @@ TaskKey[Unit]("verifyCodeFmt") := {
     throw new MessageOnlyException(
       "Unformatted Java code found. Please run 'javafmtAll' and commit the 
reformatted code")
   }
-
-  
scalafmtCheckAll.all(ScopeFilter(inAnyProject)).result.value.toEither.left.foreach
 { _ =>
-    throw new MessageOnlyException(
-      "Unformatted Scala code found. Please run 'scalafmtAll' and commit the 
reformatted code")
-  }
-
-  (Compile / scalafmtSbtCheck).result.value.toEither.left.foreach { _ =>
-    throw new MessageOnlyException(
-      "Unformatted sbt code found. Please run 'scalafmtSbt' and commit the 
reformatted code")
-  }
 }
 
 addCommandAlias("verifyCodeStyle", "headerCheckAll; verifyCodeFmt")
diff --git a/project/Common.scala b/project/Common.scala
index 0dd4e95..d0c7bc3 100644
--- a/project/Common.scala
+++ b/project/Common.scala
@@ -2,7 +2,6 @@ import akka.projections.Dependencies
 import com.geirsson.CiReleasePlugin
 import sbtdynver.DynVerPlugin.autoImport._
 import com.lightbend.paradox.projectinfo.ParadoxProjectInfoPluginKeys._
-import org.scalafmt.sbt.ScalafmtPlugin.autoImport._
 import sbt.Keys._
 import sbt._
 import sbt.plugins.JvmPlugin
@@ -55,7 +54,6 @@ object Common extends AutoPlugin {
         "-skip-packages",
         "akka.pattern" // for some reason Scaladoc creates this
       ),
-    scalafmtOnCompile := true,
     autoAPIMappings := true,
     apiURL := 
Some(url(s"https://doc.akka.io/api/akka-projection/${projectInfoVersion.value}";)),
     // show full stack traces and test case durations
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 98fe310..f351ff9 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,4 +1,4 @@
-addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.2")
+addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
 addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.7.0")
 addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.7.0")
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to