Sort alphabetically cppcheck report entries when producing the text report, this will help comparing different reports and will group together findings from the same file.
Signed-off-by: Luca Fancellu <luca.fance...@arm.com> --- xen/scripts/xen_analysis/cppcheck_report_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/scripts/xen_analysis/cppcheck_report_utils.py b/xen/scripts/xen_analysis/cppcheck_report_utils.py index 02440aefdfec..f02166ed9d19 100644 --- a/xen/scripts/xen_analysis/cppcheck_report_utils.py +++ b/xen/scripts/xen_analysis/cppcheck_report_utils.py @@ -104,6 +104,8 @@ def cppcheck_merge_txt_fragments(fragments_list, out_txt_file, strip_paths): for path in strip_paths: text_report_content[i] = text_report_content[i].replace( path + "/", "") + # sort alphabetically the entries + text_report_content.sort() # Write the final text report outfile.writelines(text_report_content) except OSError as e: -- 2.17.1