Skip to content

Commit 84ba9f4

Browse files
committed
bump google java format to 1.22.0
1 parent 42cf764 commit 84ba9f4

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

.github/workflows/java-ci-lint.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
run: |
2626
sh ./style-guide/google-format-ci-v0.1.sh
2727
env:
28-
GOOGLE_JAR_VERSION: 1.11.0
29-
GOOGLE_JAR_NAME: google-java-format-1.11.0-all-deps.jar
28+
GOOGLE_JAR_VERSION: 1.22.0
29+
GOOGLE_JAR_NAME: google-java-format-1.22.0-all-deps.jar
3030

3131
- name: Checkstyle
3232
run: |

src/scheduler/src/main/java/org/cloudfoundry/autoscaler/scheduler/service/ScheduleManager.java

+1
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ private SpecificDateScheduleEntity createCompensatorySchedule(
288288

289289
return compenstatorySchedule;
290290
}
291+
291292
/**
292293
* Calls private helper methods to delete the schedules from the database and calls
293294
* ScalingJobManager to delete scaling action jobs.

style-guide/google-format-ci-v0.1.sh

+4-9
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,17 @@ export PATH=${HOME}/go/bin:${PATH}
44
###################################################################################################
55
# This script downloads google formatter and displays formatting issues on Github actions
66
###################################################################################################
7-
GOOGLE_JAR_VERSION=${GOOGLE_JAR_VERSION:-"1.11.0"}
7+
GOOGLE_JAR_VERSION=${GOOGLE_JAR_VERSION:-"1.22.0"}
88
GOOGLE_JAR_NAME=${GOOGLE_JAR_NAME:-"google-java-format-${GOOGLE_JAR_VERSION}-all-deps.jar"}
99
! [ -e "$GOOGLE_JAR_NAME" ] && \
1010
curl -fLJO "https://github.com/google/google-java-format/releases/download/v$GOOGLE_JAR_VERSION/$GOOGLE_JAR_NAME"
11+
# shellcheck disable=SC2046
1112
files_to_be_formatted=$(java \
12-
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
13-
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
14-
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
15-
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
16-
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
17-
-jar "${GOOGLE_JAR_NAME}" -n --skip-javadoc-formatting $(find . -name '*.java') )
18-
13+
-jar "${GOOGLE_JAR_NAME}" --dry-run --skip-javadoc-formatting $(find src/scheduler -name '*.java'))
1914

2015
if [ -n "$files_to_be_formatted" ]; then
2116
echo "Formatter Results..."
2217
echo "Files require reformatting:"
2318
echo "${files_to_be_formatted}"
2419
exit 1
25-
fi
20+
fi

0 commit comments

Comments
 (0)