Skip to content

Commit 80a52bb

Browse files
committed
Check with open-java-format 2.98.0.5
The action, the pre-commit hook and the CI default to 2.98.0.5, released on 2026-09-28. It keeps the single style of 2.98.0.2, so this stays on v2. 2.98.0.5 leaves JBang directives such as //DEPS at the top of a script as written (openjavaformat/open-java-format#24), so the exclude example in the README no longer gives JBang scripts as the reason to skip files. It shows code copied from another project instead.
1 parent 83d0df8 commit 80a52bb

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fetch-depth: 0
1515
- uses: ./
1616
with:
17-
version: '2.98.0.4'
17+
version: '2.98.0.5'
1818
mode: changed
1919

2020
# The action and the hook on every platform they support, with a file that is formatted and one that
@@ -38,7 +38,7 @@ jobs:
3838
- name: Check it
3939
uses: ./
4040
with:
41-
version: '2.98.0.4'
41+
version: '2.98.0.5'
4242
mode: all
4343

4444
- name: Write a file that is not formatted
@@ -49,7 +49,7 @@ jobs:
4949
continue-on-error: true
5050
uses: ./
5151
with:
52-
version: '2.98.0.4'
52+
version: '2.98.0.5'
5353
mode: all
5454

5555
- name: Make sure the check failed

‎README.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ No Java, Maven, or Gradle required — downloads a native binary from Maven Cent
1111

1212
- uses: openjavaformat/open-java-format-action@v2
1313
with:
14-
version: '2.98.0.4'
14+
version: '2.98.0.5'
1515
```
1616
1717
v2 is for open-java-format 2.98.0.2 and later, which has a single style. A workflow that pins 2.98.0.1 stays on `@v1`, which passes that version the `--ojf` flag it needs.
@@ -20,7 +20,7 @@ v2 is for open-java-format 2.98.0.2 and later, which has a single style. A workf
2020

2121
| Input | Required | Default | Description |
2222
|-------|----------|---------|-------------|
23-
| `version` | yes | `2.98.0.4` | Version of the open-java-format native binary, one of those on [Maven Central](https://repo1.maven.org/maven2/dev/openjavaformat/open-java-format-native/) |
23+
| `version` | yes | `2.98.0.5` | Version of the open-java-format native binary, one of those on [Maven Central](https://repo1.maven.org/maven2/dev/openjavaformat/open-java-format-native/) |
2424
| `mode` | no | `changed` | `changed` — only files from PR or push; `all` — every `.java` file in repo |
2525

2626
## How `mode: changed` works
@@ -39,7 +39,7 @@ Files are checked in the open-java-format style, the formatter's only style. Whe
3939
```bash
4040
open-java-format --replace <files>
4141
# or, with Java 21 or later
42-
java -jar open-java-format-2.98.0.4-all.jar --replace <files>
42+
java -jar open-java-format-2.98.0.5-all.jar --replace <files>
4343
```
4444

4545
## Excluding files
@@ -53,16 +53,16 @@ absent, nothing is excluded.
5353
```gitignore
5454
# .open-java-format-exclude
5555
56-
# Standalone jbang scripts — the formatter would rewrite their //DEPS directives into comments
57-
samples/**
56+
# Code copied from another project — kept as it came
57+
third_party/**
5858
5959
# Generated sources
6060
**/build/generated/**
6161
```
6262

6363
Notes:
6464

65-
- Patterns use git pathspec syntax, so both `samples/**` and `samples` match everything under `samples/`.
65+
- Patterns use git pathspec syntax, so both `third_party/**` and `third_party` match everything under `third_party/`.
6666
- Lines starting with `#` are comments; blank lines are ignored.
6767
- This file is the **single source of exclusions** — it is shared by the action and the hook, so there is no separate action input to configure.
6868

@@ -82,7 +82,7 @@ jobs:
8282
8383
- uses: openjavaformat/open-java-format-action@v2
8484
with:
85-
version: '2.98.0.4'
85+
version: '2.98.0.5'
8686
mode: ${{ github.event_name == 'push' && 'all' || 'changed' }}
8787
```
8888

‎action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ inputs:
1010
version:
1111
description: 'Version of open-java-format to use'
1212
required: true
13-
default: '2.98.0.4'
13+
default: '2.98.0.5'
1414
mode:
1515
description: 'Which files to check: "changed" for files from PR/push, "all" for every .java file'
1616
required: false

‎example-usage.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ jobs:
1717
- name: Check formatting
1818
uses: openjavaformat/open-java-format-action@v2
1919
with:
20-
version: '2.98.0.4'
20+
version: '2.98.0.5'
2121
mode: ${{ github.event_name == 'push' && 'all' || 'changed' }}

‎pre-commit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
FORMATTER_VERSION="2.98.0.4"
4+
FORMATTER_VERSION="2.98.0.5"
55
CACHE_DIR="${HOME}/.cache/open-java-format"
66
BASE_URL="https://repo1.maven.org/maven2/dev/openjavaformat/open-java-format-native/${FORMATTER_VERSION}"
77

0 commit comments

Comments
 (0)