You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by md...@apache.org on 2023/04/04 12:48:35 UTC
[incubator-pekko-management] 02/02: Add javafmt and update verifyCodeFmt to use javafmt
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-management.git
commit 0390e8cfc4bc3a6f0868ac5434098dad39a2c7b9
Author: Matthew de Detrich <ma...@aiven.io>
AuthorDate: Tue Apr 4 13:36:03 2023 +0200
Add javafmt and update verifyCodeFmt to use javafmt
---
build.sbt | 8 ++------
project/plugins.sbt | 1 +
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/build.sbt b/build.sbt
index c483d47..dcfa005 100644
--- a/build.sbt
+++ b/build.sbt
@@ -290,12 +290,8 @@ def pekkoIntTestModule(moduleName: String): Project =
Project(id = s"integration-test-$moduleName", base = file(s"integration-test/$moduleName"))
TaskKey[Unit]("verifyCodeFmt") := {
- scalafmtCheckAll.all(ScopeFilter(inAnyProject)).result.value.toEither.left.foreach { _ =>
+ javafmtCheckAll.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")
+ "Unformatted Java code found. Please run 'javafmtAll' and commit the reformatted code")
}
}
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 2ac81f9..b071b39 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -2,6 +2,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.4.6")
+addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.7.0")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1")
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org