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-persistence-jdbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 4d493a4  Add scalafmt github workflow
4d493a4 is described below

commit 4d493a4412bf71ded084631a736691b3aab9a5c0
Author: Matthew de Detrich <[email protected]>
AuthorDate: Fri Mar 24 17:33:39 2023 +0100

    Add scalafmt github workflow
---
 .github/workflows/format.yml | 25 +++++++++++++++++++++++++
 .scalafmt.conf               |  2 +-
 project/plugins.sbt          |  2 +-
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
new file mode 100644
index 0000000..4367041
--- /dev/null
+++ b/.github/workflows/format.yml
@@ -0,0 +1,25 @@
+name: Scalafmt
+
+permissions: {}
+
+on:
+  pull_request:
+    branches: ['**']
+
+jobs:
+  build:
+    name: Code is formatted
+    runs-on: ubuntu-latest
+    if: github.repository == 'apache/incubator-pekko-persistence-jdbc'
+    steps:
+      - name: Checkout current branch (full)
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+          persist-credentials: false
+
+      - name: Check project is formatted
+        uses: jrouly/scalafmt-native-action@v2
+        with:
+          version: '3.7.1'
+          arguments: '--list --mode diff-ref=origin/main'
diff --git a/.scalafmt.conf b/.scalafmt.conf
index 27514fe..08c27a2 100644
--- a/.scalafmt.conf
+++ b/.scalafmt.conf
@@ -1,4 +1,4 @@
-version                                  = 3.6.1
+version                                  = 3.7.1
 runner.dialect                           = scala213
 project.git                              = true
 style                                    = defaultWithAlign
diff --git a/project/plugins.sbt b/project/plugins.sbt
index e6ce72a..309fbab 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -2,7 +2,7 @@ resolvers += "Apache Nexus 
Snapshots".at("https://repository.apache.org/content/
 
 // compliance
 addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.7.0")
-addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
+addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
 addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0")
 addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.7.0")
 


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

Reply via email to