From 464c304c59a69cbb17c8f366aa578c4f8c1a9043 Mon Sep 17 00:00:00 2001 From: Jan Schlosser Date: Fri, 24 Jul 2026 09:09:22 +0200 Subject: [PATCH] Fix analysis_report crash on MISRA C++ results generate_guideline_compliance_summary() renders the Guideline Compliance Summary report by mapping each applied standard's short name to a display name via the standard_pretty_name dict. That dict only contained entries for "cert" and "autosar", so analyzing a database against the MISRA C++ pack (codeql/misra-cpp-coding-standards) aborted the report generation with: KeyError: 'misra' at the "**Coding Standards applied**" line (and the same lookup is used again when tabulating per-guideline results). Add the missing "misra" -> "MISRA C++:2023" mapping so MISRA C++ analyses can produce the compliance summary report like the other supported standards. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- scripts/reports/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/reports/utils.py b/scripts/reports/utils.py index 6f5785808e..f631bea444 100644 --- a/scripts/reports/utils.py +++ b/scripts/reports/utils.py @@ -183,7 +183,10 @@ def generate_guideline_compliance_summary(output_directory, results_summary): print( "**Result**: " + ("Not compliant" if total_guidelines_violated > 0 else "Compliant")) standard_pretty_name = { - "cert": "CERT C++ 2016", "autosar": "AUTOSAR C++ R22-11, R21-11, R20-11, R19-11 and R19-03"} + "cert": "CERT C++ 2016", + "autosar": "AUTOSAR C++ R22-11, R21-11, R20-11, R19-11 and R19-03", + "misra": "MISRA C++:2023", + } print("**Coding Standards applied**: " + ", ".join([standard_pretty_name[standard_short_name] for standard_short_name in results_summary.guideline_violation_count.keys()]))