Travis: Enable missingOverride checker

This commit is contained in:
Daniel Marjamäki 2019-01-13 12:21:01 +01:00
parent 1d2fd29c9d
commit 0c08503b00
3 changed files with 2 additions and 3 deletions

View File

@ -177,7 +177,7 @@ script:
- cd ../ - 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 # 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 - 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 # 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 - ${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" - sh -c "! grep '^\[' /tmp/cppcheck.cppcheck"

View File

@ -1,7 +1,6 @@
unusedPrivateFunction:test/testcmdlineparser.cpp unusedPrivateFunction:test/testcmdlineparser.cpp
redundantNextPrevious:test/testtoken.cpp redundantNextPrevious:test/testtoken.cpp
simplePatternError:test/testtoken.cpp simplePatternError:test/testtoken.cpp
missingOverride
noValidConfiguration noValidConfiguration
useStlAlgorithm useStlAlgorithm
shadowFunction shadowFunction

View File

@ -20,7 +20,7 @@
#endif #endif
// C++11 override // C++11 override
#if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC >= 5)) #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC >= 5)) || defined(__CPPCHECK__)
# define OVERRIDE override # define OVERRIDE override
#else #else
# define OVERRIDE # define OVERRIDE