Skip to content

Commit cb50c92

Browse files
committed
htmlreport: splitup HTML_HEAD where we want to insert the list of errors.
1 parent ca4a0af commit cb50c92

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

htmlreport/cppcheck-htmlreport

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ HTML_HEAD = """
118118
</div>
119119
<div id="menu">
120120
<a href="index.html">Defect list</a>
121+
"""
122+
123+
HTML_HEAD_END = """
121124
</div>
122125
<div id="content">
123126
"""
@@ -304,7 +307,7 @@ if __name__ == '__main__':
304307
(options.title,
305308
#htmlFormatter.get_style_defs('.highlight'),
306309
options.title))
307-
310+
output_file.write(HTML_HEAD_END)
308311
lexer = guess_lexer_for_filename(source_filename, '')
309312
if options.source_encoding:
310313
lexer.encoding = options.source_encoding
@@ -323,6 +326,7 @@ if __name__ == '__main__':
323326
with io.open(os.path.join(options.report_dir, 'index.html'),
324327
'w') as output_file:
325328
output_file.write(HTML_HEAD % (options.title, options.title))
329+
output_file.write(HTML_HEAD_END)
326330
output_file.write(' <table>\n')
327331
output_file.write(
328332
' <tr><th>Line</th><th>Id</th><th>Severity</th><th>Message</th></tr>')

0 commit comments

Comments
 (0)