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

He-Pin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-persistence-jdbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 00901778 chore: unify formatter config - standardize aliases, add 
JDK17 setting (#524)
00901778 is described below

commit 00901778ae4639ecf2aeeabf1131ef23b365265d
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Mon Jun 15 16:47:56 2026 +0800

    chore: unify formatter config - standardize aliases, add JDK17 setting 
(#524)
    
    * chore: unify formatter config across pekko sub-projects
    
    Motivation:
    Align formatter plugins, command aliases, and JDK settings with other
    pekko sub-projects to reduce maintenance burden.
    
    Modification:
    - Standardize checkCodeStyle/applyCodeStyle command aliases
    - Add ThisBuild / javafmtFormatterCompatibleJavaVersion := 17 where missing
    - Replace custom verifyCodeFmt tasks with standard aliases where applicable
    - Upgrade sbt-java-formatter plugin where needed
    
    Result:
    Consistent formatter configuration across all pekko sub-projects.
    
    Tests:
    Not run - build config change only
    
    References:
    None - formatter unification across pekko sub-projects
    
    * fix: update CI workflow to use checkCodeStyle alias
    
    Motivation:
    CI was calling the removed verifyCodeFmt command.
    
    Modification:
    Replace verifyCodeFmt with checkCodeStyle in checks.yml.
    
    Result:
    CI code style check works with the unified alias.
    
    Tests:
    Not run - CI config change only
    
    References:
    None
---
 .github/workflows/checks.yml |  4 ++--
 build.sbt                    | 10 ++++------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index 00718d7c..5dbceb37 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -40,8 +40,8 @@ jobs:
         uses: coursier/cache-action@95e5b1029b6b86e7bac033ee44a0697d8a527d2d # 
v8.1.1
 
       - name: Code style check and binary-compatibility check
-        # Run locally with: sbt 'verifyCodeFmt ; mimaReportBinaryIssues'
-        run: sbt "; verifyCodeFmt; mimaReportBinaryIssues"
+        # Run locally with: sbt 'checkCodeStyle ; mimaReportBinaryIssues'
+        run: sbt "; checkCodeStyle; mimaReportBinaryIssues"
 
   check-code-compilation:
     name: Check Code Compilation
diff --git a/build.sbt b/build.sbt
index 758d2f10..4e9351d7 100644
--- a/build.sbt
+++ b/build.sbt
@@ -21,6 +21,8 @@ val mimaCompareVersion = "1.0.0"
 
 ThisBuild / reproducibleBuildsCheckResolver := Resolver.ApacheMavenStagingRepo
 
+ThisBuild / javafmtFormatterCompatibleJavaVersion := 17
+
 lazy val `pekko-persistence-jdbc` = project
   .in(file("."))
   .enablePlugins(ScalaUnidocPlugin)
@@ -127,9 +129,5 @@ Global / onLoad := (Global / onLoad).value.andThen { s =>
   s
 }
 
-TaskKey[Unit]("verifyCodeFmt") := {
-  
javafmtCheckAll.all(ScopeFilter(inAnyProject)).result.value.toEither.left.foreach
 { _ =>
-    throw new MessageOnlyException(
-      "Unformatted Java code found. Please run 'javafmtAll' and commit the 
reformatted code")
-  }
-}
+addCommandAlias("checkCodeStyle", "scalafmtCheckAll; scalafmtSbtCheck; 
javafmtCheckAll; +headerCheckAll")
+addCommandAlias("applyCodeStyle", "+headerCreateAll; scalafmtAll; scalafmtSbt; 
javafmtAll")


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

Reply via email to