From 181991204aa7742183af8f28995058e89f55db5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 15 Jun 2019 14:34:46 +0200 Subject: [PATCH] Travis: Improved Cppcheck self check --- .travis.yml | 2 +- .travis_suppressions | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0d71512fd..f138f0fad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -219,7 +219,7 @@ script: # building gui generates some more files that cppcheck can check, so check the repo *after* building gui - cd ../ # self check - - ${CPPCHECK} --template=gcc -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/cli -itest/synthetic -itest/testsuites -iaddons -igui . -j 2 + - ${CPPCHECK} --template=gcc -D__CPPCHECK__ -f --error-exitcode=1 --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml/ -Icli --inconclusive --enable=style,performance,portability,warning,internal --exception-handling --inline-suppr --suppressions-list=.travis_suppressions -itest/cli -itest/synthetic -itest/testsuites -iaddons -igui . -j 2 # check gui with qt settings - ${CPPCHECK} --template=gcc --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 # check naming conventions diff --git a/.travis_suppressions b/.travis_suppressions index 5e0598aa5..ff0593d0a 100644 --- a/.travis_suppressions +++ b/.travis_suppressions @@ -4,11 +4,19 @@ redundantNextPrevious:test/testtoken.cpp simplePatternError:test/testtoken.cpp noValidConfiguration shadowFunction +functionConst +functionStatic # temporary suppressions - fix the warnings! +duplicateBranch:lib/checkunusedvar.cpp +duplicateBranch:lib/tokenize.cpp missingOverride -shiftTooManyBitsSigned -unusedPrivateFunction +redundantAssignment:lib/tokenlist.cpp +unreachableCode:lib/checkbufferoverrun.cpp +unreachableCode:lib/checkclass.cpp +unreachableCode:test/testother.cpp +unusedPrivateFunction:lib/checkbufferoverrun.h +unusedPrivateFunction:test/test*.cpp useStlAlgorithm *:gui/test/* @@ -19,3 +27,4 @@ useStlAlgorithm *:externals/*/* *:htmlreport/* *:samples/*/bad.c* +*:samples/redundantAssignment/data.c