cppcheck-htmlreport: PEP8 fixes.
This commit is contained in:
parent
d2d121ce2b
commit
1b7b3102ef
|
@ -186,21 +186,21 @@ class CppCheckHandler(XmlContentHandler):
|
||||||
return
|
return
|
||||||
|
|
||||||
self.errors.append({
|
self.errors.append({
|
||||||
"file" : attributes.get("file", ""),
|
"file": attributes.get("file", ""),
|
||||||
"line" : int(attributes.get("line", 0)),
|
"line": int(attributes.get("line", 0)),
|
||||||
"id" : attributes["id"],
|
"id": attributes["id"],
|
||||||
"severity" : attributes["severity"],
|
"severity": attributes["severity"],
|
||||||
"msg" : attributes["msg"]
|
"msg": attributes["msg"]
|
||||||
})
|
})
|
||||||
|
|
||||||
def handleVersion2(self, name, attributes):
|
def handleVersion2(self, name, attributes):
|
||||||
if name == "error":
|
if name == "error":
|
||||||
self.errors.append({
|
self.errors.append({
|
||||||
"file" : "",
|
"file": "",
|
||||||
"line" : 0,
|
"line": 0,
|
||||||
"id" : attributes["id"],
|
"id": attributes["id"],
|
||||||
"severity" : attributes["severity"],
|
"severity": attributes["severity"],
|
||||||
"msg" : attributes["msg"]
|
"msg": attributes["msg"]
|
||||||
})
|
})
|
||||||
elif name == "location":
|
elif name == "location":
|
||||||
assert self.errors
|
assert self.errors
|
||||||
|
@ -252,7 +252,7 @@ if __name__ == '__main__':
|
||||||
for error in contentHandler.errors:
|
for error in contentHandler.errors:
|
||||||
filename = error["file"]
|
filename = error["file"]
|
||||||
if filename not in files.keys():
|
if filename not in files.keys():
|
||||||
files[filename] = {"errors" : [], "htmlfile" : str(file_no) + ".html"}
|
files[filename] = {"errors": [], "htmlfile": str(file_no) + ".html"}
|
||||||
file_no = file_no + 1
|
file_no = file_no + 1
|
||||||
files[filename]["errors"].append(error)
|
files[filename]["errors"].append(error)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue