From 18402bf6734357cfadf9045587bb70a2c631de2b Mon Sep 17 00:00:00 2001 From: Steven Myint Date: Fri, 11 Oct 2013 23:43:07 -0700 Subject: [PATCH] Fix Travis tests This fixes a bug introduced in #180. --- .travis.yml | 6 +++--- htmlreport/cppcheck-htmlreport | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 178a9d087..8c3c6cacd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,9 +17,9 @@ script: - ./cppcheck-htmlreport --file ../gui/test/data/xmlfiles/xmlreport_v1.xml --title "xml1 test" --report-dir . --source-dir ../test/ - ./cppcheck-htmlreport --file ../gui/test/data/xmlfiles/xmlreport_v2.xml --title "xml2 test" --report-dir . --source-dir ../test/ - ../cppcheck ../gui/test --enable=all --inconclusive --xml-version=2 2> gui_test.xml - - ./cppcheck-htmlreport --file ./gui_test.xml --title "xml2 + inconclusive test" --report-dir . --source-dir ../gui/test - - ../cppcheck ../gui/test --enable=all --inconclusive --verbose --xml-version=2 2> gui_test.xml - - ./cppcheck-htmlreport --file ./gui_test.xml --title "xml2 + inconclusive + verbose test" --report-dir . --source-dir ../gui/test + - ./cppcheck-htmlreport --file ./gui_test.xml --title "xml2 + inconclusive test" --report-dir . + - ../cppcheck ../gui/test --enable=all --inconclusive --verbose --xml-version=2 2> gui_test.xml + - ./cppcheck-htmlreport --file ./gui_test.xml --title "xml2 + inconclusive + verbose test" --report-dir . - cd ../ - mkdir install_test - make DESTDIR=install_test install diff --git a/htmlreport/cppcheck-htmlreport b/htmlreport/cppcheck-htmlreport index eacd38422..dd3fa93ab 100755 --- a/htmlreport/cppcheck-htmlreport +++ b/htmlreport/cppcheck-htmlreport @@ -196,6 +196,8 @@ class CppCheckHandler(XmlContentHandler): def handleVersion2(self, name, attributes): if name == "error": self.errors.append({ + "file" : "", + "line" : 0, "id" : attributes["id"], "severity" : attributes["severity"], "msg" : attributes["msg"]