Skip to content

Choose a tag to compare

@abashev abashev released this 19 Oct 14:22
· 2 commits to main since this release
Immutable release. Only release title and notes can be modified.
47d9951

For open-java-format 2.98.0.2 and later.

The version to check with goes in .open-java-format-version at the repository root:

2.98.0.6
- uses: actions/checkout@v7

- uses: openjavaformat/open-java-format-action@v4
  with:
    mode: ${{ github.event_name == 'push' && 'all' || 'changed' }}

What changed since v3

  • The version input is gone. The action and the pre-commit hook both read .open-java-format-version from the repository root, so the two cannot drift apart. Without the file, or with something in it that is not a version number, both stop and say what to put there.
  • The hook no longer pins FORMATTER_VERSION at its top. A repository that copied the v3 hook takes the v4 one.
  • The log warning and the code scanning alert for a newer open-java-format release now point at .open-java-format-version, line 1.

To move from v3: put the version the workflow passed as version in .open-java-format-version, drop the input, and switch to @v4.

A workflow that pins open-java-format 2.98.0.1 should stay on @v1: that version needs --ojf, which v2 and later do not pass.