Skip to content

Commit

Permalink
Use sbt-java-formatter to format Java source code (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
earldouglas authored Oct 18, 2024
1 parent b4b9799 commit 0f1b3b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 11
- run: sbt scalafmtCheckAll "scalafixAll --check" test scripted
- run: sbt javafmtCheckAll scalafmtCheckAll "scalafixAll --check" test scripted
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.13.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.12.0")
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.8.0")
4 changes: 2 additions & 2 deletions runner/src/main/java/com/earldouglas/WarRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public static void main(final String[] args) throws Exception {

final WarConfiguration warConfiguration = WarConfiguration.load(args[0]);

final String[] webappRunnerArgs =
final String[] warRunnerArgs =
new String[] {
"--port", Integer.toString(warConfiguration.port), warConfiguration.warFile.getPath(),
};

webapp.runner.launch.Main.main(webappRunnerArgs);
webapp.runner.launch.Main.main(warRunnerArgs);
}
}

0 comments on commit 0f1b3b8

Please sign in to comment.