This repository was archived by the owner on Oct 3, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,15 @@ java:
108108 tags :
109109 - privileged
110110
111+ java-format :
112+ stage : checks
113+ image : openjdk:11
114+ script : " java/check-format.sh"
115+ cache :
116+ key : " $CI_JOB_NAME"
117+ paths :
118+ - " java/*.jar"
119+
111120.build-docker :
112121 image :
113122 name : gcr.io/kaniko-project/executor:debug
Original file line number Diff line number Diff line change 99 - NAME="gcc-5" DOCKER_IMAGE=registry.gitlab.com/sosy-lab/software/sv-benchmarks/ci/gcc:5 COMMAND="gcc-5 -v --version; cd c; ./diff_ci.sh 'make -j2 CC=gcc-5 -C'"
1010 - NAME="clang-3.9" DOCKER_IMAGE=registry.gitlab.com/sosy-lab/software/sv-benchmarks/ci/clang:3.9 COMMAND="clang-3.9 -v --version; cd c; ./diff_ci.sh 'make -j2 CC=clang-3.9 -C'"
1111 - NAME="java" DOCKER_IMAGE=registry.gitlab.com/sosy-lab/software/sv-benchmarks/ci/java COMMAND="java/check-compile.sh"
12+ - NAME="java-format" DOCKER_IMAGE=openjdk:11 COMMAND="java/check-format.sh"
1213
1314# Hint to TravisCI that we want to use their container infrastructure
1415sudo : required
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -eu
3+ shopt -s globstar
4+
5+ GJF_VERSION=" 1.9"
6+ GJF_FILE=" $( dirname " $0 " ) /google-java-format-${GJF_VERSION} -all-deps.jar"
7+
8+ [ -f " ${GJF_FILE} " ] || wget " https://github.com/google/google-java-format/releases/download/google-java-format-${GJF_VERSION} /$( basename " ${GJF_FILE} " ) " -O " ${GJF_FILE} "
9+
10+ echo " List of files that need to be reformatted with google-java-format ${GJF_VERSION} :"
11+ exec java -jar " ${GJF_FILE} " --dry-run --set-exit-if-changed " $( dirname " $0 " ) /" ** /* .java
You can’t perform that action at this time.
0 commit comments