File tree Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,14 @@ echo "Running PMD..."
18
18
echo " ======================================================="
19
19
echo
20
20
cd pmd-java-dist/target
21
- unzip pmd-java-bin-1.0.0-SNAPSHOT.zip
21
+ unzip -q pmd-java-bin-1.0.0-SNAPSHOT.zip
22
22
pmd-java-bin-1.0.0-SNAPSHOT/bin/run.sh pmd --no-cache \
23
23
-f text \
24
24
-d ../../ \
25
25
-R custom-java-ruleset.xml \
26
26
--fail-on-violation false \
27
27
--report-file pmdreport.txt
28
28
29
- grep " examples/java/rules/MyRule.java" pmdreport.txt || (echo " Missing expected rule violation" ; exit 1)
29
+ grep " examples/java/rules/MyRule.java" pmdreport.txt || (echo -e " \n\n\x1b[31mMissing expected rule violation\e[0m" ; exit 1)
30
+
31
+ echo -e " \n\n\x1b[32mTest successful\e[0m"
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ echo "Running PMD..."
18
18
echo " ======================================================="
19
19
echo
20
20
cd pmd-plsql-dist/target
21
- unzip pmd-plsql-bin-1.0.0-SNAPSHOT.zip
21
+ unzip -q pmd-plsql-bin-1.0.0-SNAPSHOT.zip
22
22
pmd-plsql-bin-1.0.0-SNAPSHOT/bin/run.sh pmd --no-cache \
23
23
--use-version plsql- \
24
24
-f text \
@@ -27,5 +27,7 @@ pmd-plsql-bin-1.0.0-SNAPSHOT/bin/run.sh pmd --no-cache \
27
27
--fail-on-violation false \
28
28
--report-file pmdreport.txt
29
29
30
- grep " pmd-plsql-custom/src/test/plsql/short_variables.pls" pmdreport.txt || (echo " Missing expected rule violation" ; exit 1)
31
- grep " pmd-plsql-custom/src/test/plsql/variable_naming.pls" pmdreport.txt || (echo " Missing expected rule violation" ; exit 1)
30
+ grep " pmd-plsql-custom/src/test/plsql/short_variables.pls" pmdreport.txt || (echo -e " \n\n\x1b[31mMissing expected rule violation\e[0m" ; exit 1)
31
+ grep " pmd-plsql-custom/src/test/plsql/variable_naming.pls" pmdreport.txt || (echo -e " \n\n\x1b[31mMissing expected rule violation\e[0m" ; exit 1)
32
+
33
+ echo -e " \n\n\x1b[32mTest successful\e[0m"
Original file line number Diff line number Diff line change @@ -53,4 +53,7 @@ CLASSPATH=custom-rule-example.jar ${PMD_HOME}/bin/run.sh pmd \
53
53
-f text -d testsrc -R myrule.xml \
54
54
--fail-on-violation false \
55
55
--report-file build/report.txt
56
- grep " testsrc/Test.java" build/report.txt || (echo " Missing expected rule violation" ; exit 1)
56
+
57
+ grep " testsrc/Test.java" build/report.txt || (echo -e " \n\n\x1b[31mMissing expected rule violation\e[0m" ; exit 1)
58
+
59
+ echo -e " \n\n\x1b[32mTest successful\e[0m"
Original file line number Diff line number Diff line change @@ -6,4 +6,6 @@ java -version
6
6
mvn --version
7
7
8
8
mvn verify | tee build.log
9
- grep " You have 2 PMD violations" build.log || (echo " Missing expected rule violation" ; exit 1)
9
+ grep " You have 2 PMD violations" build.log || (echo -e " \n\n\x1b[31mMissing expected rule violation\e[0m" ; exit 1)
10
+
11
+ echo -e " \n\n\x1b[32mTest successful\e[0m"
You can’t perform that action at this time.
0 commit comments