Skip to content
Permalink
Browse files

scripts/cppcheck.sh: error out on clarifyCalculation issues

  • Loading branch information
rouault committed Jun 2, 2020
1 parent 053fe62 commit 9df71ef19a5dadf95624180a2f40dd8b513b6c71
Showing with 10 additions and 8 deletions.
  1. +10 −8 scripts/cppcheck.sh
@@ -48,18 +48,20 @@ ret_code=0
for category in "error" "style" "performance" "portability"; do
if grep "${category}," ${LOG_FILE} >/dev/null; then
echo "INFO: Issues in '${category}' category found, but not considered as making script to fail:"
grep "${category}," ${LOG_FILE}
grep "${category}," ${LOG_FILE} | grep -v "clarifyCalculation,"
echo ""
fi
done

if grep "warning," ${LOG_FILE} >/dev/null; then
echo "ERROR: Issues in 'warning' category found:"
grep "warning," ${LOG_FILE}
echo ""
echo "Warnings check failed !"
ret_code=1
fi
for category in "warning" "clarifyCalculation"; do
if grep "${category}," ${LOG_FILE} >/dev/null; then
echo "ERROR: Issues in '${category}' category found:"
grep "${category}," ${LOG_FILE}
echo ""
echo "${category} check failed !"
ret_code=1
fi
done

if [ ${ret_code} = 0 ]; then
echo "cppcheck succeeded"

0 comments on commit 9df71ef

Please sign in to comment.
You can’t perform that action at this time.