From 53637301d10151a0bd9a002b7caaba927e8a67b8 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" <6454655+adoroszlai@users.noreply.github.com> Date: Fri, 20 Sep 2019 23:05:35 +0200 Subject: [PATCH] HDDS-2157. checkstyle: print filenames relative to project root (#1485) --- hadoop-ozone/dev-support/checks/checkstyle.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hadoop-ozone/dev-support/checks/checkstyle.sh b/hadoop-ozone/dev-support/checks/checkstyle.sh index ee11e389ee..7a218a410c 100755 --- a/hadoop-ozone/dev-support/checks/checkstyle.sh +++ b/hadoop-ozone/dev-support/checks/checkstyle.sh @@ -16,6 +16,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd "$DIR/../../.." || exit 1 +BASE_DIR="$(pwd -P)" REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/checkstyle"} mkdir -p "$REPORT_DIR" REPORT_FILE="$REPORT_DIR/summary.txt" @@ -23,7 +24,16 @@ REPORT_FILE="$REPORT_DIR/summary.txt" mvn -B -fn checkstyle:check -f pom.ozone.xml #Print out the exact violations with parsing XML results with sed -find "." -name checkstyle-errors.xml -print0 | xargs -0 sed '$!N; //d' | tee "$REPORT_FILE" +find "." -name checkstyle-errors.xml -print0 \ + | xargs -0 sed '$!N; //d' \ + -e '/ "$REPORT_DIR/failures"