From 3a71eb834d0673230c2bcba76089a6178fef7e64 Mon Sep 17 00:00:00 2001 From: amai2012 Date: Mon, 2 Dec 2019 22:03:59 +0100 Subject: [PATCH] Run xmllint on cppcheck-errors.rng. Speed up creation of example XML output for validateXML target --- Makefile | 3 ++- tools/dmake.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e75855161..0023b4b16 100644 --- a/Makefile +++ b/Makefile @@ -379,10 +379,11 @@ validatePlatforms: ${PlatformFilesCHECKED} /tmp/errorlist.xml: cppcheck ./cppcheck --errorlist >$@ /tmp/example.xml: cppcheck - ./cppcheck --xml --enable=all --inconclusive --suppress=operatorEqVarError:*check.h -j 4 cli externals gui lib test 2>/tmp/example.xml + ./cppcheck --xml --enable=all --inconclusive --suppress=operatorEqVarError:*check.h --max-configs=1 -j 4 cli externals gui lib test 2>/tmp/example.xml createXMLExamples:/tmp/errorlist.xml /tmp/example.xml .PHONY: validateXML validateXML: createXMLExamples + xmllint --noout cppcheck-errors.rng xmllint --noout --relaxng cppcheck-errors.rng /tmp/errorlist.xml xmllint --noout --relaxng cppcheck-errors.rng /tmp/example.xml diff --git a/tools/dmake.cpp b/tools/dmake.cpp index b6050e1eb..c9bdd294e 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -485,6 +485,7 @@ int main(int argc, char **argv) fout << "createXMLExamples:/tmp/errorlist.xml /tmp/example.xml\n"; fout << ".PHONY: validateXML\n"; fout << "validateXML: createXMLExamples\n"; + fout << "\txmllint --noout cppcheck-errors.rng\n"; fout << "\txmllint --noout --relaxng cppcheck-errors.rng /tmp/errorlist.xml\n"; fout << "\txmllint --noout --relaxng cppcheck-errors.rng /tmp/example.xml\n"; fout << "\ncheckCWEEntries: /tmp/errorlist.xml\n";