htmlreport: splitup HTML_HEAD where we want to insert the list of errors.
This commit is contained in:
parent
ca4a0af840
commit
cb50c92d08
|
@ -118,6 +118,9 @@ HTML_HEAD = """
|
||||||
</div>
|
</div>
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
<a href="index.html">Defect list</a>
|
<a href="index.html">Defect list</a>
|
||||||
|
"""
|
||||||
|
|
||||||
|
HTML_HEAD_END = """
|
||||||
</div>
|
</div>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
"""
|
"""
|
||||||
|
@ -304,7 +307,7 @@ if __name__ == '__main__':
|
||||||
(options.title,
|
(options.title,
|
||||||
#htmlFormatter.get_style_defs('.highlight'),
|
#htmlFormatter.get_style_defs('.highlight'),
|
||||||
options.title))
|
options.title))
|
||||||
|
output_file.write(HTML_HEAD_END)
|
||||||
lexer = guess_lexer_for_filename(source_filename, '')
|
lexer = guess_lexer_for_filename(source_filename, '')
|
||||||
if options.source_encoding:
|
if options.source_encoding:
|
||||||
lexer.encoding = options.source_encoding
|
lexer.encoding = options.source_encoding
|
||||||
|
@ -323,6 +326,7 @@ if __name__ == '__main__':
|
||||||
with io.open(os.path.join(options.report_dir, 'index.html'),
|
with io.open(os.path.join(options.report_dir, 'index.html'),
|
||||||
'w') as output_file:
|
'w') as output_file:
|
||||||
output_file.write(HTML_HEAD % (options.title, options.title))
|
output_file.write(HTML_HEAD % (options.title, options.title))
|
||||||
|
output_file.write(HTML_HEAD_END)
|
||||||
output_file.write(' <table>\n')
|
output_file.write(' <table>\n')
|
||||||
output_file.write(
|
output_file.write(
|
||||||
' <tr><th>Line</th><th>Id</th><th>Severity</th><th>Message</th></tr>')
|
' <tr><th>Line</th><th>Id</th><th>Severity</th><th>Message</th></tr>')
|
||||||
|
|
Loading…
Reference in New Issue