Skip to content

Commit

Permalink
Add sbt-java-formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich authored and pjfanning committed May 28, 2023
1 parent fbb1c41 commit 6426743
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/java-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Headers

on:
pull_request:

permissions: {}

jobs:
build:
name: Java code is formatted
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Java 8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8

- name: Cache Coursier cache
uses: coursier/cache-action@v6.4.0

- name: Check headers
run: |-
sbt \
+javafmtCheck
7 changes: 4 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
addSbtPlugin("org.typelevel" % "sbt-typelevel-sonatype-ci-release" % "0.5.0-M10")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("org.typelevel" % "sbt-typelevel-sonatype-ci-release" % "0.5.0-M10")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.7.0")

0 comments on commit 6426743

Please sign in to comment.