gplugin/builders

b348dc765513
Parents 6e97f1e338ca
Children f28a853b8e1d
Ignore pvs-studio error V011 and clean up error detection.

I can't seem to ignore V011 (use if #line) via inline comments or a config
file. These are added by valac so I can't do crap to not use them.

The error detection stuff was picking up the header from pvs-studio so we now
output to a file and then verify it's length instead of stdout.
--- a/pvs-studio/build.sh Wed Jul 24 01:30:56 2019 -0500
+++ b/pvs-studio/build.sh Wed Jul 24 02:28:08 2019 -0500
@@ -18,6 +18,7 @@
cd ${CONVEY_WORKSPACE}
BUILD_DIR="build-pvs-studio"
+PLOG_ARGS="--excludedCodes V011"
# don't leak our secrets via `set -x`
set +x
@@ -46,11 +47,12 @@
pvs-studio-analyzer analyze -l /license -o pvs-studio.log
# convert the output to html
-plog-converter -a GA:1,2 -t fullhtml -o pvs-studio -p ${HG_REMOTE} -v ${HG_COMMIT} pvs-studio.log
+plog-converter -a GA:1,2 -t fullhtml -o pvs-studio -p ${HG_REMOTE} -v ${HG_COMMIT} ${PLOG_ARGS} pvs-studio.log
cp -a pvs-studio ${CONVEY_WORKSPACE}
# run the converter to determine if we found issues
-ERRORS=$(plog-converter -a GA:1,2 -t tasklist pvs-studio.log | wc -l)
+plog-converter -a GA:1,2 -t tasklist ${PLOG_ARGS} -o ${CONVEY_WORKSPACE}/pvs-studio/tasklist.txt pvs-studio.log
+ERRORS=$(wc -l ${CONVEY_WORKSPACE}/pvs-studio/tasklist.txt | awk '{print $1}')
# the tasklist output has a stock line at the top, which we ignore by checking
# if we have more than one line in the file
if [ "${ERRORS}" -gt 1 ] ; then