diff --git a/htmlreport/cppcheck-htmlreport b/htmlreport/cppcheck-htmlreport index 872544035..832f90527 100755 --- a/htmlreport/cppcheck-htmlreport +++ b/htmlreport/cppcheck-htmlreport @@ -348,7 +348,7 @@ if __name__ == '__main__': options.title, filename)) - for error in errors: + for error in sorted(errors, key=lambda k: k['line']): output_file.write(" %s %s" % (data['htmlfile'], error['line'], error['id'], error['line'])) output_file.write(HTML_HEAD_END) @@ -382,7 +382,7 @@ if __name__ == '__main__': output_file.write( "\n