Skip to content

Commit e949a8e

Browse files
committed
Fix maven/simple-project verification script
After updating maven-pmd-plugin to 3.24.0, the messages slightly changed. No summary is printed anymore, only each violation is given (if any).
1 parent f1f065c commit e949a8e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

maven/simple-project/.ci/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ set -e
77

88
echo
99
echo "Verifying build.log..."
10-
grep "You have 2 PMD violations" build.log || (echo -e "\n\n\x1b[31mMissing expected rule violation\e[0m"; exit 1)
10+
failure_count=$(grep --count "PMD Failure" build.log)
11+
if [[ $failure_count -ne 2 ]]; then
12+
echo -e "\n\n\x1b[31mMissing expected rule violations\e[0m"
13+
exit 1
14+
fi
1115

1216
echo -e "\n\n\x1b[32mTest successful\e[0m"

0 commit comments

Comments
 (0)