From 9e90bed9bb72b560ad98aa582583593f9f0ea9c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sat, 31 May 2014 23:22:24 +0200 Subject: [PATCH 1/5] htmlreport: make link to index page ("Defect list") fixed on the screen so we can always access it regardless of how low we scrolled. --- htmlreport/cppcheck-htmlreport | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htmlreport/cppcheck-htmlreport b/htmlreport/cppcheck-htmlreport index 978eb45b5..182cf2d1d 100755 --- a/htmlreport/cppcheck-htmlreport +++ b/htmlreport/cppcheck-htmlreport @@ -64,6 +64,7 @@ body { text-align: left; width: 100px; height: auto; + position: fixed; } #menu > a { @@ -80,6 +81,7 @@ body { margin: 5px; padding: 0 10px 10px 10px; width: 80%; + padding-left: 70px; } .linenos { From ca4a0af840f45107ce33d902bd4d77d5af09aedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sat, 31 May 2014 23:47:44 +0200 Subject: [PATCH 2/5] htmlreport: remove redundant
@@ -305,7 +302,7 @@ if __name__ == '__main__': 'w') as output_file: output_file.write(HTML_HEAD % (options.title, - htmlFormatter.get_style_defs('.highlight'), + #htmlFormatter.get_style_defs('.highlight'), options.title)) lexer = guess_lexer_for_filename(source_filename, '') @@ -325,13 +322,13 @@ if __name__ == '__main__': print('Creating index.html') with io.open(os.path.join(options.report_dir, 'index.html'), 'w') as output_file: - output_file.write(HTML_HEAD % (options.title, '', options.title)) - output_file.write('') + output_file.write(HTML_HEAD % (options.title, options.title)) + output_file.write('
\n') output_file.write( - '') + ' ') for filename, data in sorted(files.items()): output_file.write( - "" % + "\n " % (data['htmlfile'], filename)) for error in data['errors']: if error['severity'] == 'error': @@ -341,15 +338,15 @@ if __name__ == '__main__': if error['id'] == 'missingInclude': output_file.write( - '' % + '\n ' % (error['id'], error['severity'], error['msg'])) else: output_file.write( - "" % + "\n " % (data['htmlfile'], error['line'], error['line'], error['id'], error['severity'], error_class, error['msg'])) - output_file.write('
LineIdSeverityMessage
LineIdSeverityMessage
%s
%s
%s%s%s
%s%s%s
%d%s%s%s
%d%s%s%s
') + output_file.write('\n ') output_file.write(HTML_FOOTER % contentHandler.versionCppcheck) print('Creating style.css file') From cb50c92d084304b7f8c33cd92de9aed6eb7c4cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 1 Jun 2014 00:12:58 +0200 Subject: [PATCH 3/5] htmlreport: splitup HTML_HEAD where we want to insert the list of errors. --- htmlreport/cppcheck-htmlreport | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htmlreport/cppcheck-htmlreport b/htmlreport/cppcheck-htmlreport index d43bd90e3..23ea0c7f6 100755 --- a/htmlreport/cppcheck-htmlreport +++ b/htmlreport/cppcheck-htmlreport @@ -118,6 +118,9 @@ HTML_HEAD = """
""" @@ -304,7 +307,7 @@ if __name__ == '__main__': (options.title, #htmlFormatter.get_style_defs('.highlight'), options.title)) - + output_file.write(HTML_HEAD_END) lexer = guess_lexer_for_filename(source_filename, '') if 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'), 'w') as output_file: output_file.write(HTML_HEAD % (options.title, options.title)) + output_file.write(HTML_HEAD_END) output_file.write(' \n') output_file.write( ' ') From 5a8293d033f944e42b18193fd121425b8f4cf37f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 1 Jun 2014 01:26:23 +0200 Subject: [PATCH 4/5] htmlreport: show index of errors of current page under Defect List link. --- htmlreport/cppcheck-htmlreport | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/htmlreport/cppcheck-htmlreport b/htmlreport/cppcheck-htmlreport index 23ea0c7f6..b4874d822 100755 --- a/htmlreport/cppcheck-htmlreport +++ b/htmlreport/cppcheck-htmlreport @@ -51,7 +51,7 @@ body { margin: 30px; overflow: auto; padding: 5px 20px; - width: auto; + width: 60em; } #header { @@ -62,14 +62,16 @@ body { float: left; margin-top: 5px; text-align: left; - width: 100px; - height: auto; + width: 130px; + height: 50em; position: fixed; + overflow: auto; } #menu > a { display: block; - margin-left: 10px; + margin-left: 8px; + font: 12px; } #content { @@ -81,7 +83,7 @@ body { margin: 5px; padding: 0 10px 10px 10px; width: 80%; - padding-left: 70px; + padding-left: 100px; } .linenos { @@ -116,8 +118,9 @@ HTML_HEAD = """ -
LineIdSeverityMessage