' | grep '\([^<]*\)<\/td>/\1/' | grep -v Total > /tmp/$$.values
paste /tmp/$$.headers /tmp/$$.values | tail +2 | awk -v FS='\t' '{printf("%-20s %s\n",$1,$2)}'
rm /tmp/$$.headers /tmp/$$.values
else
- echo "xpath is not installed. Jacoco coverage summary will not be produced here...";
+ echo "Jacoco coverage summary was not found.";
fi
+echo "-----------------------------"
+echo
-if which html2text > /dev/null 2>&1; then
- echo "Untested classes, per Jacoco:"
- echo "-----------------------------"
- for i in target/site/jacoco/*/index.html; do
- html2text -width 500 -nobs $i | sed '1,/^Total/d;' | grep -v Created | sed 's/ \+/ /g' | sed 's/ [[:digit:]]$//' | grep -v 0$ | cut -d' ' -f1;
- done;
- echo
-else
- echo "html2text is not installed. Untested classes from Jacoco will not be printed here...";
-fi
+echo "Untested classes, per Jacoco for module: ${project.artifactId}"
+echo "-----------------------------"
+# Parse Jacoco XML reports directly to find classes with 0% coverage
+sed 's//&\n/g;s/<\/class>/&\n/g' target/site/jacoco/jacoco.xml | grep -v 'counter type="CLASS" missed="0"' | sed 's/>.*//;s/.*\///;s/".*//'
+echo "-----------------------------"
+echo
]]>
|