adoroszlai commented on code in PR #5755:
URL: https://github.com/apache/ozone/pull/5755#discussion_r1423598265
##########
hadoop-ozone/dev-support/checks/checkstyle.sh:
##########
@@ -30,13 +30,14 @@ declare -i rc
mvn ${MAVEN_OPTIONS} checkstyle:check > "${REPORT_DIR}/output.log"
rc=$?
if [[ ${rc} -ne 0 ]]; then
- mvn ${MAVEN_OPTIONS} clean test-compile checkstyle:check
+ mvn ${MAVEN_OPTIONS} clean test-compile checkstyle:check > output.log
rc=$?
mkdir -p "$REPORT_DIR" # removed by mvn clean
-else
- cat "${REPORT_DIR}/output.log"
+ mv output.log "${REPORT_DIR}"/
fi
+cat "${REPORT_DIR}/output.log"
Review Comment:
Previously it was in the `else` branch, not the `if` (as only the first
`mvn` execution was redirected to `output.log`). With this change, both
executions are redirected, so we'd need to `cat` in both `if` and `else`.
Which can be simplified by moving this common step after the `if`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]