2012-03-28 07:58:13 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# Use this script to check MegaGlest Source Code for errors using cppcheck
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# Written by Mark Vejvoda <mark_vejvoda@hotmail.com>
|
|
|
|
# Copyright (c) 2011 Mark Vejvoda under GNU GPL v3.0+
|
|
|
|
|
2017-01-31 00:03:48 +01:00
|
|
|
# (Actual) Location of the cppcheck binary
|
|
|
|
CPPCHECK=$(readlink -f $(which cppcheck))
|
|
|
|
|
|
|
|
# cppcheck now depends on this library (see 'cppcheck --help' for the '--library' option)
|
|
|
|
# If you use the Debian / Ubuntu package set this to: /usr/share/cppcheck/cfg/std.cfg
|
|
|
|
CPPCHECKLIB=$(dirname $CPPCHECK)/cfg/std.cfg
|
2012-03-28 07:58:13 +02:00
|
|
|
|
2017-01-31 00:03:48 +01:00
|
|
|
# File to write results to
|
|
|
|
LOGFILE=/tmp/cppcheck.log
|
2012-03-28 07:58:13 +02:00
|
|
|
|
2017-01-31 00:03:48 +01:00
|
|
|
$CPPCHECK ../../source/ \
|
|
|
|
-i ../../source/win32_deps \
|
|
|
|
-i ../../source/configurator \
|
|
|
|
-i ../../source/shared_lib/sources/libircclient \
|
|
|
|
-i ../../source/shared_lib/sources/platform/miniupnpc \
|
|
|
|
-i ../../source/shared_lib/sources/streflop \
|
|
|
|
--library=$CPPCHECKLIB \
|
|
|
|
--enable=all \
|
|
|
|
--force \
|
|
|
|
--verbose \
|
|
|
|
2> $LOGFILE
|
2013-02-11 00:38:00 +01:00
|
|
|
|
2017-01-30 14:57:38 +01:00
|
|
|
echo "Results from cppcheck were written to $LOGFILE"
|