Skip to content

Commit e4033a1

Browse files
Check with open-java-format 21.0.1
.open-java-format-version names 21.0.1, which openjavaformat/open-java-format released on 2026-11-01, so the tests run the action and the pre-commit hook with it. Made by the "Follow open-java-format releases" workflow: https://github.com/openjavaformat/open-java-format-action/actions/runs/41343240257
1 parent 47d9951 commit e4033a1

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎.open-java-format-version‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.98.0.6
1+
21.0.1

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ No Java, Maven, or Gradle required — downloads a native binary from Maven Cent
99
The version of open-java-format to check with goes in `.open-java-format-version` at the repository root, one of the versions on [Maven Central](https://repo1.maven.org/maven2/dev/openjavaformat/open-java-format-native/):
1010

1111
```
12-
2.98.0.6
12+
21.0.1
1313
```
1414

1515
The action and the [pre-commit hook](#git-pre-commit-hook) both read that file, so the two cannot drift apart; without it, both stop and ask for it. The action itself needs no inputs:
@@ -47,7 +47,7 @@ Files are checked in the open-java-format style, the formatter's only style. Whe
4747
```bash
4848
open-java-format --replace <files>
4949
# or, with Java 21 or later
50-
java -jar open-java-format-2.98.0.6-all.jar --replace <files>
50+
java -jar open-java-format-21.0.1-all.jar --replace <files>
5151
```
5252

5353
## Excluding files

‎action.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ runs:
2727
# the file the pre-commit hook reads too, so that the two cannot drift apart.
2828
FILE=".open-java-format-version"
2929
if [ ! -f "$FILE" ]; then
30-
echo "::error::No $FILE in the repository root. Put the open-java-format version to check with in it, one of the releases at https://github.com/openjavaformat/open-java-format/releases, for example: echo 2.98.0.6 > $FILE"
30+
echo "::error::No $FILE in the repository root. Put the open-java-format version to check with in it, one of the releases at https://github.com/openjavaformat/open-java-format/releases, for example: echo 21.0.1 > $FILE"
3131
exit 1
3232
fi
3333
VERSION=$(head -n1 "$FILE" | tr -d '[:space:]')
3434
if ! [[ "$VERSION" =~ ^[0-9]+(\.[0-9]+)+$ ]]; then
35-
echo "::error file=$FILE,line=1::$FILE holds '$VERSION', not an open-java-format version such as 2.98.0.6."
35+
echo "::error file=$FILE,line=1::$FILE holds '$VERSION', not an open-java-format version such as 21.0.1."
3636
exit 1
3737
fi
3838
echo "Checking with open-java-format $VERSION, from $FILE."

‎pre-commit‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ if [ ! -f "$VERSION_FILE" ]; then
88
echo "ERROR: No $VERSION_FILE in the repository root."
99
echo " Put the open-java-format version to check with in it, one of the releases at"
1010
echo " https://github.com/openjavaformat/open-java-format/releases, for example:"
11-
echo " echo 2.98.0.6 > $VERSION_FILE"
11+
echo " echo 21.0.1 > $VERSION_FILE"
1212
exit 1
1313
fi
1414
FORMATTER_VERSION=$(head -n1 "$VERSION_FILE" | tr -d '[:space:]')
1515
if ! [[ "$FORMATTER_VERSION" =~ ^[0-9]+(\.[0-9]+)+$ ]]; then
16-
echo "ERROR: $VERSION_FILE holds '$FORMATTER_VERSION', not an open-java-format version such as 2.98.0.6."
16+
echo "ERROR: $VERSION_FILE holds '$FORMATTER_VERSION', not an open-java-format version such as 21.0.1."
1717
exit 1
1818
fi
1919
CACHE_DIR="${HOME}/.cache/open-java-format"

0 commit comments

Comments
 (0)