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-cassandra.git

commit 2e5a0218de44dde9a54a9d3f0ab2974409034dae
Author: Matthew de Detrich <[email protected]>
AuthorDate: Wed Sep 6 17:28:50 2023 +0200

    Add sbt-java-formatter
---
 .github/workflows/java-format.yml | 27 +++++++++++++++++++++++++++
 project/plugins.sbt               |  1 +
 2 files changed, 28 insertions(+)

diff --git a/.github/workflows/java-format.yml 
b/.github/workflows/java-format.yml
new file mode 100644
index 0000000..c20e279
--- /dev/null
+++ b/.github/workflows/java-format.yml
@@ -0,0 +1,27 @@
+name: Headers
+
+on:
+  pull_request:
+
+permissions: {}
+
+jobs:
+  check-java-formatted:
+    name: Check Java code is formatted
+    runs-on: ubuntu-20.04
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+
+      - name: Setup Java 11
+        uses: actions/setup-java@v3
+        with:
+          distribution: temurin
+          java-version: 11
+
+      - name: Cache Coursier cache
+        uses: coursier/[email protected]
+
+      # Not sure why need to do docs/javafmtCheckAll, figure out later
+      - name: Check headers
+        run: sbt javafmtCheckAll docs/javafmtCheckAll
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 7972e06..e102877 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -11,6 +11,7 @@ addSbtPlugin("com.github.sbt" % "sbt-native-packager" % 
"1.9.9")
 
 addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.9.0")
 addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
+addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.7.0")
 addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
 addSbtPlugin("com.typesafe.sbt" % "sbt-multi-jvm" % "0.4.0")
 addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")


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

Reply via email to