summaryrefslogtreecommitdiff
path: root/scripts/cpplint_to_cppcheckxml.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cpplint_to_cppcheckxml.py')
-rwxr-xr-xscripts/cpplint_to_cppcheckxml.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/cpplint_to_cppcheckxml.py b/scripts/cpplint_to_cppcheckxml.py
index 3d553a62..2447178f 100755
--- a/scripts/cpplint_to_cppcheckxml.py
+++ b/scripts/cpplint_to_cppcheckxml.py
@@ -30,8 +30,8 @@ def parse():
# 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''')
+ sys.stderr.write(''' <cppcheck version="1.63"/>\n''')
+ sys.stderr.write(''' <errors>\n''')
# -]
# Do line-by-line conversion
@@ -48,7 +48,9 @@ def parse():
severity = cpplint_score_to_cppcheck_severity(int(score))
# 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))
+ sys.stderr.write(''' <error id="%s" severity="%s" msg="%s"/>\n'''%(label, severity, msg))
+ sys.stderr.write(''' <location file="%s" line="%s"/>\n'''%(fname, lineno))
+ sys.stderr.write(''' </error>\n'''%(fname, lineno))
# -]
# Write footer