Fixed htmlreport (#5068)
This commit is contained in:
parent
db4ca13184
commit
53adafb1f2
|
@ -172,22 +172,19 @@ class CppCheckHandler(XmlContentHandler):
|
||||||
if name != "error":
|
if name != "error":
|
||||||
return
|
return
|
||||||
|
|
||||||
if attributes["id"] == "missingInclude":
|
try:
|
||||||
self.errors.append(
|
file = attributes["file"]
|
||||||
{
|
line = int(attributes["line"])
|
||||||
"file" : "",
|
except:
|
||||||
"line" : 0,
|
file = ""
|
||||||
"id" : attributes["id"],
|
line = 0
|
||||||
"severity" : attributes["severity"],
|
if attributes["id"] != "missingInclude" and attributes["id"] != "toomanyconfigs":
|
||||||
"msg" : attributes["msg"]
|
|
||||||
})
|
|
||||||
else:
|
|
||||||
if attributes["file"] == "":
|
|
||||||
sys.stderr.write("ERROR: cppcheck error reported without a file name.\n")
|
sys.stderr.write("ERROR: cppcheck error reported without a file name.\n")
|
||||||
|
|
||||||
self.errors.append(
|
self.errors.append(
|
||||||
{
|
{
|
||||||
"file" : attributes["file"],
|
"file" : file,
|
||||||
"line" : int(attributes["line"]),
|
"line" : line,
|
||||||
"id" : attributes["id"],
|
"id" : attributes["id"],
|
||||||
"severity" : attributes["severity"],
|
"severity" : attributes["severity"],
|
||||||
"msg" : attributes["msg"]
|
"msg" : attributes["msg"]
|
||||||
|
|
Loading…
Reference in New Issue