test/cfg: enabled `information` and `--inconclusive` in all cases / some cleanups (#4784)
This commit is contained in:
parent
8583fcf96e
commit
da09a92b0a
|
@ -671,6 +671,7 @@ Library::Error Library::loadFunction(const tinyxml2::XMLElement * const node, co
|
||||||
if (name.empty())
|
if (name.empty())
|
||||||
return Error(ErrorCode::OK);
|
return Error(ErrorCode::OK);
|
||||||
|
|
||||||
|
// TODO: write debug warning if we modify an existing entry
|
||||||
Function& func = functions[name];
|
Function& func = functions[name];
|
||||||
|
|
||||||
for (const tinyxml2::XMLElement *functionnode = node->FirstChildElement(); functionnode; functionnode = functionnode->NextSiblingElement()) {
|
for (const tinyxml2::XMLElement *functionnode = node->FirstChildElement(); functionnode; functionnode = functionnode->NextSiblingElement()) {
|
||||||
|
|
|
@ -88,15 +88,15 @@ if (BUILD_TESTS)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
function(add_cfg CFG_TEST)
|
function(add_cfg CFG_TEST)
|
||||||
set(options INCONCLUSIVE)
|
|
||||||
set(oneValueArgs PLATFORM NAME)
|
set(oneValueArgs PLATFORM NAME)
|
||||||
set(multiValueArgs LIBRARY)
|
set(multiValueArgs ADD_LIBRARY)
|
||||||
|
|
||||||
cmake_parse_arguments(PARSE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
cmake_parse_arguments(PARSE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
if(PARSE_LIBRARY)
|
get_filename_component(LIBRARY ${CFG_TEST} NAME_WE)
|
||||||
string(REPLACE ";" "," LIBRARY "${PARSE_LIBRARY}")
|
# TODO: get rid of this
|
||||||
else()
|
if(PARSE_ADD_LIBRARY)
|
||||||
get_filename_component(LIBRARY ${CFG_TEST} NAME_WE)
|
string(REPLACE ";" "," ADD_LIBRARY "${PARSE_ADD_LIBRARY}")
|
||||||
|
set(LIBRARY "${ADD_LIBRARY},${LIBRARY}")
|
||||||
endif()
|
endif()
|
||||||
set(PLATFORM unix64)
|
set(PLATFORM unix64)
|
||||||
if(PARSE_PLATFORM)
|
if(PARSE_PLATFORM)
|
||||||
|
@ -107,10 +107,6 @@ if (BUILD_TESTS)
|
||||||
else()
|
else()
|
||||||
string(MAKE_C_IDENTIFIER ${CFG_TEST} TEST_NAME)
|
string(MAKE_C_IDENTIFIER ${CFG_TEST} TEST_NAME)
|
||||||
endif()
|
endif()
|
||||||
set(INCONCLUSIVE)
|
|
||||||
if(PARSE_INCONCLUSIVE)
|
|
||||||
set(INCONCLUSIVE "--inconclusive")
|
|
||||||
endif()
|
|
||||||
if ("cfg-${TEST_NAME}" IN_LIST SKIP_TESTS)
|
if ("cfg-${TEST_NAME}" IN_LIST SKIP_TESTS)
|
||||||
else()
|
else()
|
||||||
# TODO: add syntax check
|
# TODO: add syntax check
|
||||||
|
@ -119,24 +115,27 @@ if (BUILD_TESTS)
|
||||||
--check-library
|
--check-library
|
||||||
--platform=${PLATFORM}
|
--platform=${PLATFORM}
|
||||||
--library=${LIBRARY}
|
--library=${LIBRARY}
|
||||||
--enable=information
|
--enable=style,information
|
||||||
--enable=style
|
--inconclusive
|
||||||
|
--force
|
||||||
--error-exitcode=1
|
--error-exitcode=1
|
||||||
--suppress=missingIncludeSystem
|
--suppress=missingIncludeSystem
|
||||||
--inline-suppr
|
--inline-suppr
|
||||||
${INCONCLUSIVE}
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cfg/${CFG_TEST}
|
${CMAKE_CURRENT_SOURCE_DIR}/cfg/${CFG_TEST}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
add_cfg(boost.cpp INCONCLUSIVE)
|
# TODO: glob this
|
||||||
|
add_cfg(boost.cpp)
|
||||||
add_cfg(bsd.c)
|
add_cfg(bsd.c)
|
||||||
add_cfg(cairo.c)
|
add_cfg(cairo.c)
|
||||||
add_cfg(cppunit.cpp INCONCLUSIVE)
|
add_cfg(cppunit.cpp)
|
||||||
add_cfg(gnu.c LIBRARY posix;gnu)
|
# TODO: posix needs to specified first or it has a different mmap() config
|
||||||
add_cfg(googletest.cpp INCONCLUSIVE)
|
# TODO: get rid of posix dependency
|
||||||
add_cfg(gtk.c INCONCLUSIVE)
|
add_cfg(gnu.c ADD_LIBRARY posix)
|
||||||
add_cfg(kde.cpp INCONCLUSIVE)
|
add_cfg(googletest.cpp)
|
||||||
|
add_cfg(gtk.c)
|
||||||
|
add_cfg(kde.cpp)
|
||||||
add_cfg(libcurl.c)
|
add_cfg(libcurl.c)
|
||||||
add_cfg(libsigc++.cpp)
|
add_cfg(libsigc++.cpp)
|
||||||
add_cfg(lua.c)
|
add_cfg(lua.c)
|
||||||
|
@ -145,14 +144,14 @@ if (BUILD_TESTS)
|
||||||
add_cfg(openssl.c)
|
add_cfg(openssl.c)
|
||||||
add_cfg(posix.c)
|
add_cfg(posix.c)
|
||||||
add_cfg(python.c)
|
add_cfg(python.c)
|
||||||
add_cfg(qt.cpp INCONCLUSIVE)
|
add_cfg(qt.cpp)
|
||||||
add_cfg(sqlite3.c INCONCLUSIVE)
|
add_cfg(sqlite3.c)
|
||||||
add_cfg(std.c INCONCLUSIVE)
|
add_cfg(std.c)
|
||||||
add_cfg(std.cpp INCONCLUSIVE)
|
add_cfg(std.cpp)
|
||||||
add_cfg(windows.cpp INCONCLUSIVE NAME windows32A PLATFORM win32A)
|
add_cfg(windows.cpp NAME windows32A PLATFORM win32A)
|
||||||
add_cfg(windows.cpp INCONCLUSIVE NAME windows32W PLATFORM win32W)
|
add_cfg(windows.cpp NAME windows32W PLATFORM win32W)
|
||||||
add_cfg(windows.cpp INCONCLUSIVE NAME windows64 PLATFORM win64)
|
add_cfg(windows.cpp NAME windows64 PLATFORM win64)
|
||||||
add_cfg(wxwidgets.cpp INCONCLUSIVE)
|
add_cfg(wxwidgets.cpp)
|
||||||
|
|
||||||
function(fixture_cost NAME COST)
|
function(fixture_cost NAME COST)
|
||||||
if(TEST ${NAME})
|
if(TEST ${NAME})
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for boost.cfg
|
// Test library configuration for boost.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=boost --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/boost.cpp
|
// $ cppcheck --check-library --library=boost --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/boost.cpp
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Test library configuration for bsd.cfg
|
// Test library configuration for bsd.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=bsd --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/bsd.c
|
// $ cppcheck --check-library --library=bsd --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/bsd.c
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for cairo.cfg
|
// Test library configuration for cairo.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=cairo --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/cairo.c
|
// $ cppcheck --check-library --library=cairo --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/cairo.c
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Test library configuration for cppunit.cfg
|
// Test library configuration for cppunit.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=cppunit --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/cppunit.cpp
|
// $ cppcheck --check-library --library=cppunit --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/cppunit.cpp
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for gnu.cfg
|
// Test library configuration for gnu.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=gnu --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/gnu.c
|
// $ cppcheck --check-library --library=gnu --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/gnu.c
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for googletest.cfg
|
// Test library configuration for googletest.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=googletest --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/googletest.cpp
|
// $ cppcheck --check-library --library=googletest --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/googletest.cpp
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for gtk.cfg
|
// Test library configuration for gtk.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=gtk --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr --library=gtk test/cfg/gtk.cpp
|
// $ cppcheck --check-library --library=gtk --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr --library=gtk test/cfg/gtk.cpp
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for kde.cfg
|
// Test library configuration for kde.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=kde --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/kde.cpp
|
// $ cppcheck --check-library --library=kde --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/kde.cpp
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for libcurl.cfg
|
// Test library configuration for libcurl.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=libcurl --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/libcurl.c
|
// $ cppcheck --check-library --library=libcurl --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/libcurl.c
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for libsigc++.cfg
|
// Test library configuration for libsigc++.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=libsigc++ --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/libsigc++.cpp
|
// $ cppcheck --check-library --library=libsigc++ --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/libsigc++.cpp
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for lua.cfg
|
// Test library configuration for lua.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=lua --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/lua.c
|
// $ cppcheck --check-library --library=lua --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/lua.c
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for opencv2.cfg
|
// Test library configuration for opencv2.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=opencv2 --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/opencv2.cpp
|
// $ cppcheck --check-library --library=opencv2 --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/opencv2.cpp
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for openmp.cfg
|
// Test library configuration for openmp.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=openmp --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/openmp.c
|
// $ cppcheck --check-library --library=openmp --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/openmp.c
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for openssl.cfg
|
// Test library configuration for openssl.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=openssl --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/openssl.c
|
// $ cppcheck --check-library --library=openssl --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/openssl.c
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for posix.cfg
|
// Test library configuration for posix.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=posix --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/posix.c
|
// $ cppcheck --check-library --library=posix --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/posix.c
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
@ -1235,11 +1235,11 @@ void uninitvar_types(void)
|
||||||
{
|
{
|
||||||
// cppcheck-suppress unassignedVariable
|
// cppcheck-suppress unassignedVariable
|
||||||
blkcnt_t b;
|
blkcnt_t b;
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress [uninitvar,constStatement]
|
||||||
b + 1;
|
b + 1;
|
||||||
|
|
||||||
struct dirent d;
|
struct dirent d;
|
||||||
// TODO cppcheck-suppress uninitvar
|
// cppcheck-suppress constStatement - TODO: uninitvar
|
||||||
d.d_ino + 1;
|
d.d_ino + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for python.cfg
|
// Test library configuration for python.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=python --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/python.c
|
// $ cppcheck --check-library --library=python --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/python.c
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for qt.cfg
|
// Test library configuration for qt.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=qt --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/qt.cpp
|
// $ cppcheck --check-library --library=qt --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/qt.cpp
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -23,7 +23,7 @@ CPPCHECK="$DIR"../../cppcheck
|
||||||
CFG="$DIR"../../cfg/
|
CFG="$DIR"../../cfg/
|
||||||
|
|
||||||
# Cppcheck options
|
# Cppcheck options
|
||||||
CPPCHECK_OPT='--check-library --platform=unix64 --enable=style --error-exitcode=-1 --suppress=missingIncludeSystem --inline-suppr --template="{file}:{line}:{severity}:{id}:{message}"'
|
CPPCHECK_OPT='--check-library --platform=unix64 --enable=style,information --inconclusive --force --error-exitcode=-1 --suppress=missingIncludeSystem --inline-suppr --template="{file}:{line}:{severity}:{id}:{message}"'
|
||||||
|
|
||||||
# Compiler settings
|
# Compiler settings
|
||||||
CXX=g++
|
CXX=g++
|
||||||
|
@ -408,98 +408,101 @@ function cppunit_fn {
|
||||||
|
|
||||||
function check_file {
|
function check_file {
|
||||||
f=$(basename $1)
|
f=$(basename $1)
|
||||||
|
lib="${f%%.*}"
|
||||||
case $f in
|
case $f in
|
||||||
boost.cpp)
|
boost.cpp)
|
||||||
boost_fn
|
boost_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=boost ${DIR}boost.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
bsd.c)
|
bsd.c)
|
||||||
bsd_fn
|
bsd_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=bsd ${DIR}bsd.c
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
cairo.c)
|
cairo.c)
|
||||||
cairo_fn
|
cairo_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=cairo ${DIR}cairo.c
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
cppunit.cpp)
|
cppunit.cpp)
|
||||||
cppunit_fn
|
cppunit_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=cppunit -f ${DIR}cppunit.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
gnu.c)
|
gnu.c)
|
||||||
gnu_fn
|
gnu_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=posix,gnu ${DIR}gnu.c
|
# TODO: posix needs to specified first or it has a different mmap() config
|
||||||
|
# TODO: get rid of posix dependency
|
||||||
|
${CPPCHECK} ${CPPCHECK_OPT} --library=posix,$lib ${DIR}gnu.c
|
||||||
;;
|
;;
|
||||||
googletest.cpp)
|
googletest.cpp)
|
||||||
googletest_fn
|
googletest_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=googletest ${DIR}googletest.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
gtk.c)
|
gtk.c)
|
||||||
gtk_fn
|
gtk_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=gtk -f ${DIR}gtk.c
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
kde.cpp)
|
kde.cpp)
|
||||||
# TODO: "kde-4config" is no longer commonly available in recent distros
|
# TODO: "kde-4config" is no longer commonly available in recent distros
|
||||||
#kde_fn
|
#kde_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=kde ${DIR}kde.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
libcurl.c)
|
libcurl.c)
|
||||||
libcurl_fn
|
libcurl_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=libcurl ${DIR}libcurl.c
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
libsigc++.cpp)
|
libsigc++.cpp)
|
||||||
libsigcpp_fn
|
libsigcpp_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=libsigc++ ${DIR}libsigc++.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
lua.c)
|
lua.c)
|
||||||
lua_fn
|
lua_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=lua ${DIR}lua.c
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
opencv2.cpp)
|
opencv2.cpp)
|
||||||
# TODO: "opencv.pc" is not commonly available in distros
|
# TODO: "opencv.pc" is not commonly available in distros
|
||||||
#opencv2_fn
|
#opencv2_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=opencv2 ${DIR}opencv2.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
openmp.c)
|
openmp.c)
|
||||||
openmp_fn
|
openmp_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=openmp ${DIR}openmp.c
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
openssl.c)
|
openssl.c)
|
||||||
openssl_fn
|
openssl_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=openssl ${DIR}openssl.c
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
posix.c)
|
posix.c)
|
||||||
posix_fn
|
posix_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=posix ${DIR}posix.c
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
python.c)
|
python.c)
|
||||||
python_fn
|
python_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=python ${DIR}python.c
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
qt.cpp)
|
qt.cpp)
|
||||||
qt_fn
|
qt_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=qt ${DIR}qt.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
sqlite3.c)
|
sqlite3.c)
|
||||||
sqlite3_fn
|
sqlite3_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=sqlite3 ${DIR}sqlite3.c
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
std.c)
|
std.c)
|
||||||
std_c_fn
|
std_c_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive ${DIR}std.c
|
${CPPCHECK} ${CPPCHECK_OPT} ${DIR}$f
|
||||||
;;
|
;;
|
||||||
std.cpp)
|
std.cpp)
|
||||||
std_cpp_fn
|
std_cpp_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive ${DIR}std.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} ${DIR}$f
|
||||||
;;
|
;;
|
||||||
windows.cpp)
|
windows.cpp)
|
||||||
windows_fn
|
windows_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --platform=win32A --library=windows ${DIR}windows.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --platform=win32A --library=$lib ${DIR}$f
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --platform=win32W --library=windows ${DIR}windows.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --platform=win32W --library=$lib ${DIR}$f
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --platform=win64 --library=windows ${DIR}windows.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --platform=win64 --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
wxwidgets.cpp)
|
wxwidgets.cpp)
|
||||||
wxwidgets_fn
|
wxwidgets_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=wxwidgets,windows -f ${DIR}wxwidgets.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --library=$lib ${DIR}$f
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unhandled file $f"
|
echo "Unhandled file $f"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for sqlite3.cfg
|
// Test library configuration for sqlite3.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --enable=style --library=sqlite3 --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/sqlite3.c
|
// $ cppcheck --check-library --library=sqlite3 --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/sqlite3.c
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for std.cfg
|
// Test library configuration for std.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=std --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/std.c
|
// $ cppcheck --check-library --library=std --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/std.c
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for std.cfg
|
// Test library configuration for std.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=std --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/std.cpp
|
// $ cppcheck --check-library --library=std --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/std.cpp
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for windows.cfg
|
// Test library configuration for windows.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ cppcheck --check-library --library=windows --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/windows.cpp
|
// $ cppcheck --check-library --library=windows --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/windows.cpp
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Test library configuration for wxwidgets.cfg
|
// Test library configuration for wxwidgets.cfg
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// $ ./cppcheck --check-library --library=wxwidgets --enable=style --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/wxwidgets.cpp
|
// $ ./cppcheck --check-library --library=wxwidgets --enable=style,information --inconclusive --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/wxwidgets.cpp
|
||||||
// =>
|
// =>
|
||||||
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue