Skip to content

Commit 063ff07

Browse files
authored
RATIS-2355. Duplicate output in checkstyle check (#1310)
1 parent 9052dad commit 063ff07

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

dev-support/checks/checkstyle.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@ REPORT_FILE="$REPORT_DIR/summary.txt"
2626
MAVEN_OPTIONS='-B -fae -Dcheckstyle.failOnViolation=false'
2727

2828
declare -i rc
29-
${MVN} ${MAVEN_OPTIONS} checkstyle:check | tee "${REPORT_DIR}/output.log"
29+
${MVN} ${MAVEN_OPTIONS} checkstyle:check > "${REPORT_DIR}/output.log"
3030
rc=$?
3131
if [[ ${rc} -ne 0 ]]; then
32-
${MVN} ${MAVEN_OPTIONS} clean test-compile checkstyle:check
32+
${MVN} ${MAVEN_OPTIONS} clean test-compile checkstyle:check > output.log
3333
rc=$?
3434
mkdir -p "$REPORT_DIR" # removed by mvn clean
35-
else
36-
cat "${REPORT_DIR}/output.log"
35+
mv output.log "${REPORT_DIR}"/
3736
fi
3837

38+
cat "${REPORT_DIR}/output.log"
39+
3940
#Print out the exact violations with parsing XML results with sed
4041
find "." -name checkstyle-result.xml -print0 \
4142
| xargs -0 sed '$!N; /<file.*\n<\/file/d;P;D' \

0 commit comments

Comments
 (0)