Repository navigation
·
15 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
First release of the GitHub Action for open-java-format.
Checks the formatting of Java files with the open-java-format native binary, downloaded from Maven Central — no Java, Maven or Gradle needed on the runner. The same check also comes as a git pre-commit hook.
- uses: actions/checkout@v7
- uses: openjavaformat/open-java-format-action@v1
with:
version: '2.98.0.1'
mode: ${{ github.event_name == 'push' && 'all' || 'changed' }}What's in it
mode: changedchecks only the files of the pull request or push,mode: allchecks every.javafile- Files are checked in the open-java-format style (
--ojf); fix them locally withopen-java-format --ojf --replace <files> - Files matching
.open-java-format-excludein the repository root are skipped, by the action and the hook alike - A warning when a newer open-java-format release is out
- Native binaries for Linux x86_64 and aarch64 (glibc), macOS Apple Silicon and Intel