diff --git a/.github/workflows/build-test-prValidation.yml b/.github/workflows/build-test-prValidation.yml index 579cb23e7b..1caa71a2d3 100644 --- a/.github/workflows/build-test-prValidation.yml +++ b/.github/workflows/build-test-prValidation.yml @@ -32,7 +32,7 @@ jobs: sbt -jvm-opts .jvmopts-ci \ -Dsbt.override.build.repos=false \ -Dsbt.log.noformat=false \ - scalafmtCheckAll scalafmtSbtCheck headerCheckAll + verifyCodeStyle pull-request-validation: name: Check / Tests diff --git a/build.sbt b/build.sbt index 6bc3bcb344..36fd316239 100644 --- a/build.sbt +++ b/build.sbt @@ -12,21 +12,8 @@ enablePlugins( JavaFormatterPlugin) disablePlugins(MimaPlugin) -// check format and headers -TaskKey[Unit]("verifyCodeFmt") := { - javafmtCheckAll.all(ScopeFilter(inAnyProject)).result.value.toEither.left.foreach { _ => - throw new MessageOnlyException( - "Unformatted Java code found. Please run 'javafmtAll' (or use the 'applyCodeStyle' alias) and commit the reformatted code") - } - - scalafmtCheckAll.all(ScopeFilter(inAnyProject)).result.value.toEither.left.foreach { _ => - throw new MessageOnlyException( - "Unformatted Scala code found. Please run 'scalafmtAll' (or use the 'applyCodeStyle' alias) and commit the reformatted code") - } -} - -addCommandAlias("verifyCodeStyle", "headerCheckAll; verifyCodeFmt") -addCommandAlias("applyCodeStyle", "headerCreateAll; javafmtAll; scalafmtAll") +addCommandAlias("verifyCodeStyle", "scalafmtCheckAll; scalafmtSbtCheck; headerCheckAll") +addCommandAlias("applyCodeStyle", "headerCreateAll; scalafmtAll; scalafmtSbtAll") addCommandAlias( name = "fixall",