From 0c08503b00a1a9f6abdaf209579b471087cdbc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 13 Jan 2019 12:21:01 +0100 Subject: [PATCH] Travis: Enable missingOverride checker --- .travis.yml | 2 +- .travis_suppressions | 1 - lib/config.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 985924839..3982dc383 100644 --- a/.travis.yml +++ b/.travis.yml @@ -177,7 +177,7 @@ script: - cd ../ # use same hack as for clang to work around cppchecks broken exit status with -j 2 ; create file, tee everything to the file and stdout, grep for errors in the file - touch /tmp/cppcheck.cppcheck - - ${CPPCHECK} --error-exitcode=1 --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml/ -Icli --enable=style,performance,portability,warning,internal --exception-handling --inline-suppr --suppressions-list=.travis_suppressions -itest/synthetic -iaddons -igui . -j 2 |& tee /tmp/cppcheck.cppcheck + - ${CPPCHECK} -D__CPPCHECK__ -f --error-exitcode=1 --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml/ -Icli --enable=style,performance,portability,warning,internal --exception-handling --inline-suppr --suppressions-list=.travis_suppressions -itest/synthetic -iaddons -igui . -j 2 |& tee /tmp/cppcheck.cppcheck # check gui with qt settings - ${CPPCHECK} --library=qt --error-exitcode=1 -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml/ -Icli --enable=style,performance,portability,warning,internal --exception-handling -j 2 gui --suppressions-list=.travis_suppressions -igui/test |& tee --append /tmp/cppcheck.cppcheck - sh -c "! grep '^\[' /tmp/cppcheck.cppcheck" diff --git a/.travis_suppressions b/.travis_suppressions index 1b50208c4..29c096d44 100644 --- a/.travis_suppressions +++ b/.travis_suppressions @@ -1,7 +1,6 @@ unusedPrivateFunction:test/testcmdlineparser.cpp redundantNextPrevious:test/testtoken.cpp simplePatternError:test/testtoken.cpp -missingOverride noValidConfiguration useStlAlgorithm shadowFunction diff --git a/lib/config.h b/lib/config.h index d54dc151e..853ad46db 100644 --- a/lib/config.h +++ b/lib/config.h @@ -20,7 +20,7 @@ #endif // C++11 override -#if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC >= 5)) +#if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC >= 5)) || defined(__CPPCHECK__) # define OVERRIDE override #else # define OVERRIDE