Skip to content

Choose a tag to compare

@abashev abashev released this 21 Sep 18:50
· 13 commits to main since this release
Immutable release. Only release title and notes can be modified.
98bff05

For open-java-format 2.98.0.2 and later.

- uses: actions/checkout@v7

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

What changed since v1

  • The action and the pre-commit hook no longer pass --ojf: open-java-format 2.98.0.2 has a single style. Fix files locally with open-java-format --replace <files>.
  • version defaults to 2.98.0.2, and so does the hook's FORMATTER_VERSION.
  • Windows runners on x86-64 work, with the Windows binary that 2.98.0.2 ships. The hook runs under Git Bash as well.
  • actions/cache inside the action is pinned to a commit SHA, for repositories that require pinned actions.
  • The CI now runs the action and the hook against a formatted file and one that is not, on Linux and macOS on both architectures and on Windows.

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