提交 7b26cacc authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Improve cppcheck.sh

上级 fd6d6aa0
......@@ -17,13 +17,12 @@ if ! type "cppcheck-htmlreport" &> /dev/null; then
exit 1
fi
__IGNORE_MACROS="-U SOCK_CLOEXEC -U SOCK_NONBLOCK"
CPPCHECKS="warning,style,performance,portability,unusedFunction"
XML_FILE="/tmp/mediasoup-worker-cppcheck.xml"
REPORT_DIR="/tmp/mediasoup-worker-cppcheck-report"
echo ">>> [INFO] running cppcheck ..."
cppcheck --std=c++11 --enable=$CPPCHECKS -v --quiet --report-progress --inline-suppr --error-exitcode=13 -I include src --xml-version=2 2> $XML_FILE
cppcheck --std=c++11 --enable=$CPPCHECKS -v --quiet --report-progress --inline-suppr --error-exitcode=69 -I include src --xml-version=2 2> $XML_FILE
# If exit code is 1 it means that some cppcheck option is wrong, so abort.
if [ $? -eq 1 ] ; then
......@@ -36,3 +35,5 @@ cppcheck-htmlreport --title="mediasoup-worker" --file=$XML_FILE --report-dir=$RE
echo ">>> [INFO] opening HTML report ..."
open $REPORT_DIR/index.html
ening HTML report ..."
open $REPORT_DIR/index.html
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论