summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-04-01 14:34:21 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-04-01 14:34:21 +0000
commit92f5b06cbbff0f053f34503afddaeeb2c29efde1 (patch)
tree8948d991fa3815dfa76f91b61bd68cea84f96046 /scripts
parent27aafb2466da4c67eeb9bc55b7275141108a845b (diff)
GCovr replaces lcov - cpplint_to_cppcheckxml to be conform with xml version 2
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/xunit@529 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e042eea0b285159f071afb0d07729e6c381f036d
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/cpplint_to_cppcheckxml.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/cpplint_to_cppcheckxml.py b/scripts/cpplint_to_cppcheckxml.py
index e3a2d2de..ecb36a48 100755
--- a/scripts/cpplint_to_cppcheckxml.py
+++ b/scripts/cpplint_to_cppcheckxml.py
@@ -27,7 +27,12 @@ def parse():
# TODO: do this properly, using the xml module.
# Write header
sys.stderr.write('''<?xml version="1.0" encoding="UTF-8"?>\n''')
- sys.stderr.write('''<results>\n''')
+ # VR : sys.stderr.write('''<results>\n''')
+ # Add from VR + [
+ sys.stderr.write('''<results version=2>\n''')
+ sys.stderr.write('''<cppcheck version="1.63"/>\n''')
+ sys.stderr.write('''<errors>\n''')
+ # -]
# Do line-by-line conversion
r = re.compile('([^:]*):([0-9]*): ([^\[]*)\[([^\]]*)\] \[([0-9]*)\].*')
@@ -41,9 +46,15 @@ def parse():
continue
fname, lineno, msg, label, score = g
severity = cpplint_score_to_cppcheck_severity(int(score))
- sys.stderr.write('''<error file="%s" line="%s" id="%s" severity="%s" msg="%s"/>\n'''%(fname, lineno, label, severity, msg))
+ # VR : sys.stderr.write('''<error file="%s" line="%s" id="%s" severity="%s" msg="%s"/>\n'''%(fname, lineno, label, severity, msg))
+ # Add from VR + [
+ sys.stderr.write('''<error file="%s" line="%s" id="%s" severity="%s" msg="%s"/>\n</error>\n'''%(fname, lineno, label, severity, msg))
+ # -]
# Write footer
+ # Add from VR + [
+ sys.stderr.write('''</errors>\n'''%(fname, lineno, label, severity, msg))
+ # -]
sys.stderr.write('''</results>\n''')