This is an automated email from the ASF dual-hosted git repository.
dineshc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 11b0984 HDDS-3341. Checkstyle fails for new modules/versions (#768)
11b0984 is described below
commit 11b09843070d590c432dca7ec3390a78e5697f9c
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Fri Apr 3 23:34:03 2020 +0200
HDDS-3341. Checkstyle fails for new modules/versions (#768)
---
hadoop-hdds/dev-support/checkstyle/checkstyle.xml | 5 ++++-
hadoop-ozone/dev-support/checks/checkstyle.sh | 13 ++++++++++---
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/hadoop-hdds/dev-support/checkstyle/checkstyle.xml
b/hadoop-hdds/dev-support/checkstyle/checkstyle.xml
index 1c43741..8168efc 100644
--- a/hadoop-hdds/dev-support/checkstyle/checkstyle.xml
+++ b/hadoop-hdds/dev-support/checkstyle/checkstyle.xml
@@ -49,6 +49,10 @@
<module name="Checker">
+ <module name="BeforeExecutionExclusionFileFilter">
+ <property name="fileNamePattern" value=".*/target/generated.*"/>
+ </module>
+
<module name="SuppressWarningsFilter"/>
<!-- Checks that a package.html file exists for each package. -->
@@ -192,5 +196,4 @@
<module name="UpperEll"/>
</module>
-
</module>
diff --git a/hadoop-ozone/dev-support/checks/checkstyle.sh
b/hadoop-ozone/dev-support/checks/checkstyle.sh
index 6b4bf42..933fb44 100755
--- a/hadoop-ozone/dev-support/checks/checkstyle.sh
+++ b/hadoop-ozone/dev-support/checks/checkstyle.sh
@@ -21,9 +21,15 @@ REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/checkstyle"}
mkdir -p "$REPORT_DIR"
REPORT_FILE="$REPORT_DIR/summary.txt"
-set -e
-mvn -B checkstyle:check -D checkstyle.failOnViolation=false
-set +e
+declare -i rc
+mvn -B checkstyle:check -Dcheckstyle.failOnViolation=false >
"${REPORT_DIR}/output.log"
+rc=$?
+if [[ ${rc} -ne 0 ]]; then
+ mvn -B test-compile checkstyle:check -Dcheckstyle.failOnViolation=false
+ rc=$?
+else
+ cat "${REPORT_DIR}/output.log"
+fi
#Print out the exact violations with parsing XML results with sed
find "." -name checkstyle-errors.xml -print0 \
@@ -43,3 +49,4 @@ grep -c ':' "$REPORT_FILE" > "$REPORT_DIR/failures"
if [[ -s "${REPORT_FILE}" ]]; then
exit 1
fi
+exit ${rc}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]