Fixed some markup errors in generated html from the cppcheck-htmlreport script.
This commit is contained in:
parent
5e8e4fd3e9
commit
e85cfd8041
|
@ -116,6 +116,9 @@ HTML_HEAD = """
|
||||||
<head>
|
<head>
|
||||||
<title>CppCheck - Html report</title>
|
<title>CppCheck - Html report</title>
|
||||||
<link href="style.css" rel="stylesheet" />
|
<link href="style.css" rel="stylesheet" />
|
||||||
|
<style type="text/css">
|
||||||
|
%s
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="body">
|
<body class="body">
|
||||||
<div id="page-header">
|
<div id="page-header">
|
||||||
|
@ -242,9 +245,9 @@ if __name__ == '__main__':
|
||||||
content = stream.read()
|
content = stream.read()
|
||||||
stream.close()
|
stream.close()
|
||||||
|
|
||||||
htmlFormatter = HtmlFormatter(linenos=True, style='colorful', full=True, hl_lines=lines, lineanchors="line")
|
htmlFormatter = HtmlFormatter(linenos=True, style='colorful', hl_lines=lines, lineanchors="line")
|
||||||
stream = file(os.path.join(options.report_dir, htmlfile), "w")
|
stream = file(os.path.join(options.report_dir, htmlfile), "w")
|
||||||
stream.write(HTML_HEAD)
|
stream.write(HTML_HEAD % htmlFormatter.get_style_defs(".highlight"))
|
||||||
stream.write(highlight(content, guess_lexer_for_filename(source_file, ""), htmlFormatter))
|
stream.write(highlight(content, guess_lexer_for_filename(source_file, ""), htmlFormatter))
|
||||||
stream.write(HTML_FOOTER)
|
stream.write(HTML_FOOTER)
|
||||||
stream.close()
|
stream.close()
|
||||||
|
@ -255,7 +258,7 @@ if __name__ == '__main__':
|
||||||
# all the errors created.
|
# all the errors created.
|
||||||
print("Creating index.html")
|
print("Creating index.html")
|
||||||
stream = file(os.path.join(options.report_dir, "index.html"), "w")
|
stream = file(os.path.join(options.report_dir, "index.html"), "w")
|
||||||
stream.write(HTML_HEAD)
|
stream.write(HTML_HEAD % "")
|
||||||
stream.write("<table>")
|
stream.write("<table>")
|
||||||
stream.write("<tr><th>Line</th><th>Id</th><th>Severity</th><th>Message</th></tr>")
|
stream.write("<tr><th>Line</th><th>Id</th><th>Severity</th><th>Message</th></tr>")
|
||||||
for filename, data in files.iteritems():
|
for filename, data in files.iteritems():
|
||||||
|
|
Loading…
Reference in New Issue