From cf8523b198925aec848850efd17d0a63416eadac Mon Sep 17 00:00:00 2001 From: amai2012 Date: Mon, 24 Sep 2018 13:13:05 +0200 Subject: [PATCH] #8711 Extend XML being generated to validate the XML output format by adding an unmatchedSuppression. Also use proper cppcheck executable to generate them --- Makefile | 2 +- tools/dmake.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8041d6f3a..d158a8334 100644 --- a/Makefile +++ b/Makefile @@ -320,7 +320,7 @@ validatePlatforms: ${PlatformFilesCHECKED} /tmp/errorlist.xml: cppcheck cppcheck --errorlist >$@ /tmp/example.xml: cppcheck - cppcheck --xml --inconclusive -j 4 cli externals gui lib test 2>/tmp/example.xml + cppcheck --xml --inconclusive -j 4 --suppress=operatorEqVarError:*check.h --enable=all cli externals gui lib test 2>/tmp/example.xml createXMLExamples:/tmp/errorlist.xml /tmp/example.xml .PHONY: validateXML validateXML: createXMLExamples diff --git a/tools/dmake.cpp b/tools/dmake.cpp index 964111c5a..70b6f1e80 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -416,9 +416,9 @@ int main(int argc, char **argv) fout << "validatePlatforms: ${PlatformFilesCHECKED}\n\n"; fout << "# Validate XML output (to detect regressions)\n"; fout << "/tmp/errorlist.xml: cppcheck\n"; - fout << "\tcppcheck --errorlist >$@\n"; + fout << "\t./cppcheck --errorlist >$@\n"; fout << "/tmp/example.xml: cppcheck\n"; - fout << "\tcppcheck --xml --inconclusive -j 4 cli externals gui lib test 2>/tmp/example.xml\n"; + fout << "\t./cppcheck --xml --enable=all --inconclusive --suppress=operatorEqVarError:*check.h cli externals gui lib test 2>/tmp/example.xml\n"; fout << "createXMLExamples:/tmp/errorlist.xml /tmp/example.xml\n"; fout << ".PHONY: validateXML\n"; fout << "validateXML: createXMLExamples\n";