From d565280bf3736d12639b7a1f99131199f0287e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 13 Feb 2026 16:33:33 +0100 Subject: [PATCH 1/5] remove premiumCheckers --- lib/checkers.cpp | 793 +----------------------------------------- lib/checkers.h | 1 - tools/get_checkers.py | 6 - 3 files changed, 1 insertion(+), 799 deletions(-) diff --git a/lib/checkers.cpp b/lib/checkers.cpp index a84da1bc986..e374058f332 100644 --- a/lib/checkers.cpp +++ b/lib/checkers.cpp @@ -1,6 +1,6 @@ /* * Cppcheck - A tool for static C/C++ code analysis - * Copyright (C) 2007-2025 Cppcheck team. + * Copyright (C) 2007-2026 Cppcheck team. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -211,797 +211,6 @@ namespace checkers { {"CheckVaarg::va_start_argument",""}, }; - const std::map premiumCheckers{ - {"Autosar: A0-1-3",""}, - {"Autosar: A0-1-4",""}, - {"Autosar: A0-1-5",""}, - {"Autosar: A0-1-6",""}, - {"Autosar: A0-4-2",""}, - {"Autosar: A0-4-4",""}, - {"Autosar: A10-1-1",""}, - {"Autosar: A11-0-2",""}, - {"Autosar: A11-3-1",""}, - {"Autosar: A13-2-1",""}, - {"Autosar: A13-2-3",""}, - {"Autosar: A13-5-2",""}, - {"Autosar: A13-5-5",""}, - {"Autosar: A15-1-2",""}, - {"Autosar: A15-3-5",""}, - {"Autosar: A16-6-1",""}, - {"Autosar: A16-7-1",""}, - {"Autosar: A18-0-3",""}, - {"Autosar: A18-1-1",""}, - {"Autosar: A18-1-2",""}, - {"Autosar: A18-1-3",""}, - {"Autosar: A18-5-1",""}, - {"Autosar: A18-9-1",""}, - {"Autosar: A2-11-1",""}, - {"Autosar: A2-13-1",""}, - {"Autosar: A2-13-3",""}, - {"Autosar: A2-13-5",""}, - {"Autosar: A2-5-2",""}, - {"Autosar: A2-7-1",""}, - {"Autosar: A20-8-2","warning"}, - {"Autosar: A20-8-3","warning"}, - {"Autosar: A20-8-4",""}, - {"Autosar: A20-8-5",""}, - {"Autosar: A20-8-6",""}, - {"Autosar: A21-8-1","warning"}, - {"Autosar: A23-0-1",""}, - {"Autosar: A25-1-1","warning"}, - {"Autosar: A25-4-1","warning"}, - {"Autosar: A26-5-1",""}, - {"Autosar: A26-5-2",""}, - {"Autosar: A27-0-1","warning"}, - {"Autosar: A27-0-2",""}, - {"Autosar: A27-0-4",""}, - {"Autosar: A3-1-3",""}, - {"Autosar: A3-1-4",""}, - {"Autosar: A3-3-1",""}, - {"Autosar: A3-9-1",""}, - {"Autosar: A4-10-1",""}, - {"Autosar: A4-7-1",""}, - {"Autosar: A5-0-2",""}, - {"Autosar: A5-0-3",""}, - {"Autosar: A5-0-4",""}, - {"Autosar: A5-1-1",""}, - {"Autosar: A5-1-2",""}, - {"Autosar: A5-1-3",""}, - {"Autosar: A5-1-6",""}, - {"Autosar: A5-1-7",""}, - {"Autosar: A5-16-1",""}, - {"Autosar: A5-2-1",""}, - {"Autosar: A5-2-3",""}, - {"Autosar: A5-2-4",""}, - {"Autosar: A5-3-3",""}, - {"Autosar: A6-5-3",""}, - {"Autosar: A7-1-4",""}, - {"Autosar: A7-1-6",""}, - {"Autosar: A7-1-7",""}, - {"Autosar: A7-2-1",""}, - {"Autosar: A7-2-2",""}, - {"Autosar: A7-6-1",""}, - {"Autosar: A8-4-1",""}, - {"Autosar: A8-5-3",""}, - {"Autosar: A9-3-1",""}, - {"Cert C++: CON50-CPP",""}, - {"Cert C++: CON51-CPP",""}, - {"Cert C++: CON52-CPP",""}, - {"Cert C++: CON53-CPP",""}, - {"Cert C++: CON54-CPP",""}, - {"Cert C++: CON55-CPP",""}, - {"Cert C++: CON56-CPP",""}, - {"Cert C++: CTR50-CPP",""}, - {"Cert C++: CTR52-CPP",""}, - {"Cert C++: CTR53-CPP",""}, - {"Cert C++: CTR56-CPP",""}, - {"Cert C++: CTR57-CPP","warning"}, - {"Cert C++: CTR58-CPP","warning"}, - {"Cert C++: DCL50-CPP",""}, - {"Cert C++: DCL51-CPP",""}, - {"Cert C++: DCL52-CPP",""}, - {"Cert C++: DCL53-CPP",""}, - {"Cert C++: DCL54-CPP",""}, - {"Cert C++: DCL56-CPP",""}, - {"Cert C++: DCL58-CPP",""}, - {"Cert C++: DCL59-CPP",""}, - {"Cert C++: ERR50-CPP",""}, - {"Cert C++: ERR51-CPP",""}, - {"Cert C++: ERR52-CPP",""}, - {"Cert C++: ERR53-CPP",""}, - {"Cert C++: ERR54-CPP",""}, - {"Cert C++: ERR55-CPP",""}, - {"Cert C++: ERR56-CPP",""}, - {"Cert C++: ERR58-CPP",""}, - {"Cert C++: ERR59-CPP","warning"}, - {"Cert C++: ERR60-CPP","warning"}, - {"Cert C++: ERR61-CPP",""}, - {"Cert C++: ERR62-CPP",""}, - {"Cert C++: EXP50-CPP",""}, - {"Cert C++: EXP51-CPP",""}, - {"Cert C++: EXP54-CPP",""}, - {"Cert C++: EXP55-CPP",""}, - {"Cert C++: EXP56-CPP",""}, - {"Cert C++: EXP57-CPP",""}, - {"Cert C++: EXP58-CPP",""}, - {"Cert C++: EXP59-CPP",""}, - {"Cert C++: EXP60-CPP",""}, - {"Cert C++: FIO51-CPP",""}, - {"Cert C++: INT50-CPP",""}, - {"Cert C++: MEM51-CPP",""}, - {"Cert C++: MEM52-CPP",""}, - {"Cert C++: MEM53-CPP",""}, - {"Cert C++: MEM54-CPP",""}, - {"Cert C++: MEM55-CPP",""}, - {"Cert C++: MEM57-CPP",""}, - {"Cert C++: MSC50-CPP",""}, - {"Cert C++: MSC51-CPP",""}, - {"Cert C++: MSC53-CPP",""}, - {"Cert C++: MSC54-CPP",""}, - {"Cert C++: OOP51-CPP",""}, - {"Cert C++: OOP55-CPP",""}, - {"Cert C++: OOP56-CPP",""}, - {"Cert C++: OOP57-CPP",""}, - {"Cert C++: OOP58-CPP",""}, - {"Cert C++: STR50-CPP",""}, - {"Cert C++: STR53-CPP",""}, - {"Cert C: ARR30-C",""}, - {"Cert C: ARR32-C",""}, - {"Cert C: ARR37-C",""}, - {"Cert C: ARR38-C",""}, - {"Cert C: ARR39-C",""}, - {"Cert C: CON30-C",""}, - {"Cert C: CON31-C",""}, - {"Cert C: CON32-C",""}, - {"Cert C: CON33-C",""}, - {"Cert C: CON34-C",""}, - {"Cert C: CON35-C",""}, - {"Cert C: CON36-C",""}, - {"Cert C: CON37-C",""}, - {"Cert C: CON38-C",""}, - {"Cert C: CON39-C",""}, - {"Cert C: CON40-C",""}, - {"Cert C: CON41-C",""}, - {"Cert C: DCL03-C",""}, - {"Cert C: DCL04-C",""}, - {"Cert C: DCL05-C",""}, - {"Cert C: DCL06-C",""}, - {"Cert C: DCL20-C",""}, - {"Cert C: DCL31-C",""}, - {"Cert C: DCL36-C",""}, - {"Cert C: DCL37-C",""}, - {"Cert C: DCL38-C",""}, - {"Cert C: DCL39-C",""}, - {"Cert C: DCL40-C",""}, - {"Cert C: DCL41-C",""}, - {"Cert C: ENV30-C",""}, - {"Cert C: ENV31-C",""}, - {"Cert C: ENV32-C",""}, - {"Cert C: ENV33-C",""}, - {"Cert C: ENV34-C",""}, - {"Cert C: ERR30-C",""}, - {"Cert C: ERR32-C",""}, - {"Cert C: ERR33-C",""}, - {"Cert C: ERR34-C",""}, - {"Cert C: EXP03-C",""}, - {"Cert C: EXP05-C",""}, - {"Cert C: EXP09-C",""}, - {"Cert C: EXP13-C",""}, - {"Cert C: EXP15-C",""}, - {"Cert C: EXP19-C",""}, - {"Cert C: EXP20-C",""}, - {"Cert C: EXP30-C",""}, - {"Cert C: EXP32-C",""}, - {"Cert C: EXP34-C",""}, - {"Cert C: EXP35-C",""}, - {"Cert C: EXP36-C",""}, - {"Cert C: EXP37-C",""}, - {"Cert C: EXP39-C",""}, - {"Cert C: EXP40-C",""}, - {"Cert C: EXP42-C",""}, - {"Cert C: EXP43-C",""}, - {"Cert C: EXP44-C",""}, - {"Cert C: EXP45-C",""}, - {"Cert C: FIO30-C",""}, - {"Cert C: FIO32-C",""}, - {"Cert C: FIO34-C",""}, - {"Cert C: FIO37-C",""}, - {"Cert C: FIO38-C",""}, - {"Cert C: FIO40-C",""}, - {"Cert C: FIO41-C",""}, - {"Cert C: FIO44-C",""}, - {"Cert C: FIO45-C",""}, - {"Cert C: FLP30-C",""}, - {"Cert C: FLP36-C","portability"}, - {"Cert C: FLP37-C",""}, - {"Cert C: INT17-C",""}, - {"Cert C: INT30-C",""}, - {"Cert C: INT31-C",""}, - {"Cert C: INT32-C",""}, - {"Cert C: INT33-C",""}, - {"Cert C: INT34-C",""}, - {"Cert C: INT35-C",""}, - {"Cert C: INT36-C",""}, - {"Cert C: MEM33-C",""}, - {"Cert C: MEM35-C",""}, - {"Cert C: MEM36-C",""}, - {"Cert C: MSC30-C",""}, - {"Cert C: MSC32-C",""}, - {"Cert C: MSC33-C",""}, - {"Cert C: MSC38-C",""}, - {"Cert C: MSC39-C",""}, - {"Cert C: MSC40-C",""}, - {"Cert C: MSC41-C",""}, - {"Cert C: PRE00-C",""}, - {"Cert C: PRE01-C",""}, - {"Cert C: PRE02-C",""}, - {"Cert C: PRE04-C",""}, - {"Cert C: PRE05-C",""}, - {"Cert C: PRE06-C",""}, - {"Cert C: PRE07-C",""}, - {"Cert C: PRE08-C",""}, - {"Cert C: PRE09-C",""}, - {"Cert C: PRE10-C",""}, - {"Cert C: PRE11-C",""}, - {"Cert C: PRE12-C",""}, - {"Cert C: PRE31-C",""}, - {"Cert C: SIG30-C",""}, - {"Cert C: SIG31-C",""}, - {"Cert C: SIG34-C",""}, - {"Cert C: SIG35-C",""}, - {"Cert C: STR30-C",""}, - {"Cert C: STR31-C",""}, - {"Cert C: STR32-C",""}, - {"Cert C: STR34-C",""}, - {"Cert C: STR38-C",""}, - {"Misra C++ 2008: 3-2-3",""}, - {"Misra C++ 2008: 3-2-4",""}, - {"Misra C++ 2008: 7-5-4",""}, - {"Misra C++ 2008: M0-1-11",""}, - {"Misra C++ 2008: M0-1-12",""}, - {"Misra C++ 2008: M0-1-4",""}, - {"Misra C++ 2008: M0-1-5",""}, - {"Misra C++ 2008: M0-1-7",""}, - {"Misra C++ 2008: M0-1-8",""}, - {"Misra C++ 2008: M0-3-2",""}, - {"Misra C++ 2008: M1-0-1","portability"}, - {"Misra C++ 2008: M10-1-1",""}, - {"Misra C++ 2008: M10-1-2",""}, - {"Misra C++ 2008: M10-1-3",""}, - {"Misra C++ 2008: M10-2-1",""}, - {"Misra C++ 2008: M10-3-1",""}, - {"Misra C++ 2008: M10-3-2",""}, - {"Misra C++ 2008: M10-3-3",""}, - {"Misra C++ 2008: M11-0-1",""}, - {"Misra C++ 2008: M12-1-2",""}, - {"Misra C++ 2008: M12-8-1",""}, - {"Misra C++ 2008: M12-8-2",""}, - {"Misra C++ 2008: M14-5-1","warning"}, - {"Misra C++ 2008: M14-5-2","warning"}, - {"Misra C++ 2008: M14-5-3","warning"}, - {"Misra C++ 2008: M14-6-1","warning"}, - {"Misra C++ 2008: M14-6-2","warning"}, - {"Misra C++ 2008: M14-7-1",""}, - {"Misra C++ 2008: M14-7-2",""}, - {"Misra C++ 2008: M14-7-3",""}, - {"Misra C++ 2008: M14-8-1",""}, - {"Misra C++ 2008: M14-8-2",""}, - {"Misra C++ 2008: M15-0-3",""}, - {"Misra C++ 2008: M15-1-1",""}, - {"Misra C++ 2008: M15-1-2",""}, - {"Misra C++ 2008: M15-1-3",""}, - {"Misra C++ 2008: M15-3-2","warning"}, - {"Misra C++ 2008: M15-3-3",""}, - {"Misra C++ 2008: M15-3-4",""}, - {"Misra C++ 2008: M15-3-6",""}, - {"Misra C++ 2008: M15-3-7",""}, - {"Misra C++ 2008: M15-4-1",""}, - {"Misra C++ 2008: M15-5-2",""}, - {"Misra C++ 2008: M16-0-1",""}, - {"Misra C++ 2008: M16-0-2",""}, - {"Misra C++ 2008: M16-0-3",""}, - {"Misra C++ 2008: M16-0-4",""}, - {"Misra C++ 2008: M16-0-6",""}, - {"Misra C++ 2008: M16-0-7",""}, - {"Misra C++ 2008: M16-0-8",""}, - {"Misra C++ 2008: M16-1-1",""}, - {"Misra C++ 2008: M16-1-2",""}, - {"Misra C++ 2008: M16-2-1",""}, - {"Misra C++ 2008: M16-2-2",""}, - {"Misra C++ 2008: M16-2-3",""}, - {"Misra C++ 2008: M16-2-4",""}, - {"Misra C++ 2008: M16-2-5",""}, - {"Misra C++ 2008: M16-2-6",""}, - {"Misra C++ 2008: M16-3-1",""}, - {"Misra C++ 2008: M16-3-2",""}, - {"Misra C++ 2008: M17-0-1",""}, - {"Misra C++ 2008: M17-0-2",""}, - {"Misra C++ 2008: M17-0-3",""}, - {"Misra C++ 2008: M17-0-5",""}, - {"Misra C++ 2008: M18-0-1",""}, - {"Misra C++ 2008: M18-0-2",""}, - {"Misra C++ 2008: M18-0-3",""}, - {"Misra C++ 2008: M18-0-4",""}, - {"Misra C++ 2008: M18-0-5",""}, - {"Misra C++ 2008: M18-2-1",""}, - {"Misra C++ 2008: M18-4-1",""}, - {"Misra C++ 2008: M18-7-1",""}, - {"Misra C++ 2008: M19-3-1",""}, - {"Misra C++ 2008: M2-10-1",""}, - {"Misra C++ 2008: M2-10-3",""}, - {"Misra C++ 2008: M2-10-4",""}, - {"Misra C++ 2008: M2-10-5",""}, - {"Misra C++ 2008: M2-10-6",""}, - {"Misra C++ 2008: M2-13-2",""}, - {"Misra C++ 2008: M2-13-3",""}, - {"Misra C++ 2008: M2-13-4",""}, - {"Misra C++ 2008: M2-13-5",""}, - {"Misra C++ 2008: M2-3-1",""}, - {"Misra C++ 2008: M2-7-1",""}, - {"Misra C++ 2008: M2-7-2",""}, - {"Misra C++ 2008: M2-7-3",""}, - {"Misra C++ 2008: M27-0-1",""}, - {"Misra C++ 2008: M3-1-1",""}, - {"Misra C++ 2008: M3-1-2",""}, - {"Misra C++ 2008: M3-1-3",""}, - {"Misra C++ 2008: M3-2-1",""}, - {"Misra C++ 2008: M3-3-1",""}, - {"Misra C++ 2008: M3-3-2",""}, - {"Misra C++ 2008: M3-9-1",""}, - {"Misra C++ 2008: M3-9-2",""}, - {"Misra C++ 2008: M3-9-3",""}, - {"Misra C++ 2008: M4-10-1",""}, - {"Misra C++ 2008: M4-10-2",""}, - {"Misra C++ 2008: M4-5-1",""}, - {"Misra C++ 2008: M4-5-2",""}, - {"Misra C++ 2008: M4-5-3",""}, - {"Misra C++ 2008: M5-0-10",""}, - {"Misra C++ 2008: M5-0-11",""}, - {"Misra C++ 2008: M5-0-12",""}, - {"Misra C++ 2008: M5-0-14",""}, - {"Misra C++ 2008: M5-0-15",""}, - {"Misra C++ 2008: M5-0-2",""}, - {"Misra C++ 2008: M5-0-20",""}, - {"Misra C++ 2008: M5-0-21",""}, - {"Misra C++ 2008: M5-0-3",""}, - {"Misra C++ 2008: M5-0-4",""}, - {"Misra C++ 2008: M5-0-5",""}, - {"Misra C++ 2008: M5-0-6",""}, - {"Misra C++ 2008: M5-0-7",""}, - {"Misra C++ 2008: M5-0-8",""}, - {"Misra C++ 2008: M5-0-9",""}, - {"Misra C++ 2008: M5-14-1",""}, - {"Misra C++ 2008: M5-17-1",""}, - {"Misra C++ 2008: M5-18-1",""}, - {"Misra C++ 2008: M5-19-1",""}, - {"Misra C++ 2008: M5-2-1",""}, - {"Misra C++ 2008: M5-2-10",""}, - {"Misra C++ 2008: M5-2-11",""}, - {"Misra C++ 2008: M5-2-12",""}, - {"Misra C++ 2008: M5-2-2",""}, - {"Misra C++ 2008: M5-2-3",""}, - {"Misra C++ 2008: M5-2-5",""}, - {"Misra C++ 2008: M5-2-6",""}, - {"Misra C++ 2008: M5-2-7",""}, - {"Misra C++ 2008: M5-2-8",""}, - {"Misra C++ 2008: M5-2-9",""}, - {"Misra C++ 2008: M5-3-1",""}, - {"Misra C++ 2008: M5-3-2",""}, - {"Misra C++ 2008: M5-3-3",""}, - {"Misra C++ 2008: M6-2-1",""}, - {"Misra C++ 2008: M6-2-2",""}, - {"Misra C++ 2008: M6-2-3",""}, - {"Misra C++ 2008: M6-3-1",""}, - {"Misra C++ 2008: M6-4-1",""}, - {"Misra C++ 2008: M6-4-2",""}, - {"Misra C++ 2008: M6-4-3",""}, - {"Misra C++ 2008: M6-4-4",""}, - {"Misra C++ 2008: M6-4-5",""}, - {"Misra C++ 2008: M6-4-6",""}, - {"Misra C++ 2008: M6-4-7",""}, - {"Misra C++ 2008: M6-4-8",""}, - {"Misra C++ 2008: M6-5-1",""}, - {"Misra C++ 2008: M6-5-2",""}, - {"Misra C++ 2008: M6-5-3",""}, - {"Misra C++ 2008: M6-5-4",""}, - {"Misra C++ 2008: M6-5-5",""}, - {"Misra C++ 2008: M6-5-6",""}, - {"Misra C++ 2008: M6-6-1",""}, - {"Misra C++ 2008: M6-6-2",""}, - {"Misra C++ 2008: M6-6-3",""}, - {"Misra C++ 2008: M6-6-4",""}, - {"Misra C++ 2008: M6-6-5",""}, - {"Misra C++ 2008: M7-2-1",""}, - {"Misra C++ 2008: M7-3-1",""}, - {"Misra C++ 2008: M7-3-2",""}, - {"Misra C++ 2008: M7-3-3",""}, - {"Misra C++ 2008: M7-3-4",""}, - {"Misra C++ 2008: M7-3-5",""}, - {"Misra C++ 2008: M7-3-6",""}, - {"Misra C++ 2008: M7-4-2",""}, - {"Misra C++ 2008: M7-4-3",""}, - {"Misra C++ 2008: M7-5-3",""}, - {"Misra C++ 2008: M8-0-1",""}, - {"Misra C++ 2008: M8-3-1",""}, - {"Misra C++ 2008: M8-4-4",""}, - {"Misra C++ 2008: M8-5-2",""}, - {"Misra C++ 2008: M8-5-3",""}, - {"Misra C++ 2008: M9-3-1",""}, - {"Misra C++ 2008: M9-5-1",""}, - {"Misra C++ 2008: M9-6-2",""}, - {"Misra C++ 2008: M9-6-3",""}, - {"Misra C++ 2008: M9-6-4",""}, - {"Misra C++ 2023: 0.1.2",""}, - {"Misra C++ 2023: 0.2.1",""}, - {"Misra C++ 2023: 0.2.2",""}, - {"Misra C++ 2023: 0.2.3",""}, - {"Misra C++ 2023: 0.2.4",""}, - {"Misra C++ 2023: 10.0.1",""}, - {"Misra C++ 2023: 10.1.2",""}, - {"Misra C++ 2023: 10.2.1",""}, - {"Misra C++ 2023: 10.2.2",""}, - {"Misra C++ 2023: 10.2.3",""}, - {"Misra C++ 2023: 10.3.1",""}, - {"Misra C++ 2023: 10.4.1",""}, - {"Misra C++ 2023: 11.3.1",""}, - {"Misra C++ 2023: 11.3.2",""}, - {"Misra C++ 2023: 11.6.1",""}, - {"Misra C++ 2023: 11.6.3",""}, - {"Misra C++ 2023: 12.2.1",""}, - {"Misra C++ 2023: 12.2.2",""}, - {"Misra C++ 2023: 12.2.3",""}, - {"Misra C++ 2023: 12.3.1",""}, - {"Misra C++ 2023: 13.1.1",""}, - {"Misra C++ 2023: 13.1.2",""}, - {"Misra C++ 2023: 13.3.1",""}, - {"Misra C++ 2023: 13.3.2",""}, - {"Misra C++ 2023: 13.3.3",""}, - {"Misra C++ 2023: 13.3.4",""}, - {"Misra C++ 2023: 14.1.1",""}, - {"Misra C++ 2023: 15.0.1",""}, - {"Misra C++ 2023: 15.0.2",""}, - {"Misra C++ 2023: 15.1.2",""}, - {"Misra C++ 2023: 15.1.3",""}, - {"Misra C++ 2023: 15.1.5",""}, - {"Misra C++ 2023: 16.5.1",""}, - {"Misra C++ 2023: 16.5.2",""}, - {"Misra C++ 2023: 16.6.1",""}, - {"Misra C++ 2023: 17.8.1",""}, - {"Misra C++ 2023: 18.1.1",""}, - {"Misra C++ 2023: 18.1.2",""}, - {"Misra C++ 2023: 18.3.1",""}, - {"Misra C++ 2023: 18.3.2",""}, - {"Misra C++ 2023: 18.3.3",""}, - {"Misra C++ 2023: 18.4.1",""}, - {"Misra C++ 2023: 18.5.1",""}, - {"Misra C++ 2023: 18.5.2",""}, - {"Misra C++ 2023: 19.0.1",""}, - {"Misra C++ 2023: 19.0.2",""}, - {"Misra C++ 2023: 19.0.3",""}, - {"Misra C++ 2023: 19.0.4",""}, - {"Misra C++ 2023: 19.1.1",""}, - {"Misra C++ 2023: 19.1.2",""}, - {"Misra C++ 2023: 19.1.3",""}, - {"Misra C++ 2023: 19.2.1",""}, - {"Misra C++ 2023: 19.2.2",""}, - {"Misra C++ 2023: 19.2.3",""}, - {"Misra C++ 2023: 19.3.1",""}, - {"Misra C++ 2023: 19.3.2",""}, - {"Misra C++ 2023: 19.3.3",""}, - {"Misra C++ 2023: 19.3.4",""}, - {"Misra C++ 2023: 19.6.1",""}, - {"Misra C++ 2023: 21.10.1",""}, - {"Misra C++ 2023: 21.10.2",""}, - {"Misra C++ 2023: 21.10.3",""}, - {"Misra C++ 2023: 21.2.1",""}, - {"Misra C++ 2023: 21.2.2",""}, - {"Misra C++ 2023: 21.2.3",""}, - {"Misra C++ 2023: 21.2.4",""}, - {"Misra C++ 2023: 21.6.1",""}, - {"Misra C++ 2023: 21.6.2",""}, - {"Misra C++ 2023: 21.6.3",""}, - {"Misra C++ 2023: 21.6.4",""}, - {"Misra C++ 2023: 21.6.5",""}, - {"Misra C++ 2023: 22.3.1",""}, - {"Misra C++ 2023: 22.4.1",""}, - {"Misra C++ 2023: 23.11.1",""}, - {"Misra C++ 2023: 24.5.1",""}, - {"Misra C++ 2023: 24.5.2",""}, - {"Misra C++ 2023: 25.5.1",""}, - {"Misra C++ 2023: 25.5.2",""}, - {"Misra C++ 2023: 25.5.3",""}, - {"Misra C++ 2023: 26.3.1",""}, - {"Misra C++ 2023: 28.3.1",""}, - {"Misra C++ 2023: 28.6.1",""}, - {"Misra C++ 2023: 28.6.2",""}, - {"Misra C++ 2023: 30.0.1",""}, - {"Misra C++ 2023: 30.0.2",""}, - {"Misra C++ 2023: 4.1.1",""}, - {"Misra C++ 2023: 4.1.2",""}, - {"Misra C++ 2023: 5.0.1",""}, - {"Misra C++ 2023: 5.10.1",""}, - {"Misra C++ 2023: 5.13.1",""}, - {"Misra C++ 2023: 5.13.2",""}, - {"Misra C++ 2023: 5.13.3",""}, - {"Misra C++ 2023: 5.13.4",""}, - {"Misra C++ 2023: 5.13.5",""}, - {"Misra C++ 2023: 5.13.6",""}, - {"Misra C++ 2023: 5.13.7",""}, - {"Misra C++ 2023: 5.7.1",""}, - {"Misra C++ 2023: 5.7.2",""}, - {"Misra C++ 2023: 5.7.3",""}, - {"Misra C++ 2023: 6.0.1",""}, - {"Misra C++ 2023: 6.0.2",""}, - {"Misra C++ 2023: 6.0.3",""}, - {"Misra C++ 2023: 6.0.4",""}, - {"Misra C++ 2023: 6.2.2",""}, - {"Misra C++ 2023: 6.2.3",""}, - {"Misra C++ 2023: 6.2.4",""}, - {"Misra C++ 2023: 6.4.2",""}, - {"Misra C++ 2023: 6.4.3",""}, - {"Misra C++ 2023: 6.5.1",""}, - {"Misra C++ 2023: 6.5.2",""}, - {"Misra C++ 2023: 6.7.1",""}, - {"Misra C++ 2023: 6.7.2",""}, - {"Misra C++ 2023: 6.8.3",""}, - {"Misra C++ 2023: 6.8.4",""}, - {"Misra C++ 2023: 6.9.1",""}, - {"Misra C++ 2023: 6.9.2",""}, - {"Misra C++ 2023: 7.0.1",""}, - {"Misra C++ 2023: 7.0.2",""}, - {"Misra C++ 2023: 7.0.3",""}, - {"Misra C++ 2023: 7.0.4",""}, - {"Misra C++ 2023: 7.0.5",""}, - {"Misra C++ 2023: 7.0.6",""}, - {"Misra C++ 2023: 7.11.1",""}, - {"Misra C++ 2023: 7.11.2",""}, - {"Misra C++ 2023: 7.11.3",""}, - {"Misra C++ 2023: 8.0.1",""}, - {"Misra C++ 2023: 8.1.1",""}, - {"Misra C++ 2023: 8.1.2",""}, - {"Misra C++ 2023: 8.14.1",""}, - {"Misra C++ 2023: 8.18.2",""}, - {"Misra C++ 2023: 8.19.1",""}, - {"Misra C++ 2023: 8.2.1",""}, - {"Misra C++ 2023: 8.2.10",""}, - {"Misra C++ 2023: 8.2.11",""}, - {"Misra C++ 2023: 8.2.2",""}, - {"Misra C++ 2023: 8.2.3",""}, - {"Misra C++ 2023: 8.2.4",""}, - {"Misra C++ 2023: 8.2.5",""}, - {"Misra C++ 2023: 8.2.6",""}, - {"Misra C++ 2023: 8.2.7",""}, - {"Misra C++ 2023: 8.2.8",""}, - {"Misra C++ 2023: 8.2.9",""}, - {"Misra C++ 2023: 8.20.1",""}, - {"Misra C++ 2023: 8.3.1",""}, - {"Misra C++ 2023: 8.3.2",""}, - {"Misra C++ 2023: 9.2.1",""}, - {"Misra C++ 2023: 9.3.1",""}, - {"Misra C++ 2023: 9.4.1",""}, - {"Misra C++ 2023: 9.4.2",""}, - {"Misra C++ 2023: 9.5.1",""}, - {"Misra C++ 2023: 9.5.2",""}, - {"Misra C++ 2023: 9.6.1",""}, - {"Misra C++ 2023: 9.6.2",""}, - {"Misra C++ 2023: 9.6.3",""}, - {"Misra C++ 2023: 9.6.4",""}, - {"Misra C: 1.2",""}, - {"Misra C: 1.4",""}, - {"Misra C: 1.5",""}, - {"Misra C: 10.1",""}, - {"Misra C: 10.2",""}, - {"Misra C: 10.3",""}, - {"Misra C: 10.4",""}, - {"Misra C: 10.5",""}, - {"Misra C: 10.6",""}, - {"Misra C: 10.7",""}, - {"Misra C: 10.8",""}, - {"Misra C: 11.1",""}, - {"Misra C: 11.10",""}, - {"Misra C: 11.11",""}, - {"Misra C: 11.2",""}, - {"Misra C: 11.3",""}, - {"Misra C: 11.4",""}, - {"Misra C: 11.5",""}, - {"Misra C: 11.6",""}, - {"Misra C: 11.7",""}, - {"Misra C: 11.8",""}, - {"Misra C: 11.9",""}, - {"Misra C: 12.1",""}, - {"Misra C: 12.2",""}, - {"Misra C: 12.3",""}, - {"Misra C: 12.4",""}, - {"Misra C: 12.6",""}, - {"Misra C: 13.1",""}, - {"Misra C: 13.2",""}, - {"Misra C: 13.3",""}, - {"Misra C: 13.4",""}, - {"Misra C: 13.5",""}, - {"Misra C: 13.6",""}, - {"Misra C: 14.1",""}, - {"Misra C: 14.2",""}, - {"Misra C: 14.4",""}, - {"Misra C: 15.1",""}, - {"Misra C: 15.2",""}, - {"Misra C: 15.3",""}, - {"Misra C: 15.4",""}, - {"Misra C: 15.5",""}, - {"Misra C: 15.6",""}, - {"Misra C: 15.7",""}, - {"Misra C: 16.1",""}, - {"Misra C: 16.2",""}, - {"Misra C: 16.3",""}, - {"Misra C: 16.4",""}, - {"Misra C: 16.5",""}, - {"Misra C: 16.6",""}, - {"Misra C: 16.7",""}, - {"Misra C: 17.1",""}, - {"Misra C: 17.10",""}, - {"Misra C: 17.11",""}, - {"Misra C: 17.12",""}, - {"Misra C: 17.13",""}, - {"Misra C: 17.2",""}, - {"Misra C: 17.3",""}, - {"Misra C: 17.4",""}, - {"Misra C: 17.6",""}, - {"Misra C: 17.7",""}, - {"Misra C: 17.8",""}, - {"Misra C: 17.9",""}, - {"Misra C: 18.10",""}, - {"Misra C: 18.4",""}, - {"Misra C: 18.5",""}, - {"Misra C: 18.7",""}, - {"Misra C: 18.8",""}, - {"Misra C: 18.9",""}, - {"Misra C: 19.2",""}, - {"Misra C: 19.3",""}, - {"Misra C: 2.2",""}, - {"Misra C: 2.7",""}, - {"Misra C: 20.1",""}, - {"Misra C: 20.10",""}, - {"Misra C: 20.11",""}, - {"Misra C: 20.12",""}, - {"Misra C: 20.13",""}, - {"Misra C: 20.14",""}, - {"Misra C: 20.15",""}, - {"Misra C: 20.2",""}, - {"Misra C: 20.3",""}, - {"Misra C: 20.4",""}, - {"Misra C: 20.5",""}, - {"Misra C: 20.7",""}, - {"Misra C: 20.8",""}, - {"Misra C: 20.9",""}, - {"Misra C: 21.1",""}, - {"Misra C: 21.10",""}, - {"Misra C: 21.11",""}, - {"Misra C: 21.12",""}, - {"Misra C: 21.14",""}, - {"Misra C: 21.15",""}, - {"Misra C: 21.16",""}, - {"Misra C: 21.18",""}, - {"Misra C: 21.19",""}, - {"Misra C: 21.2",""}, - {"Misra C: 21.20",""}, - {"Misra C: 21.21",""}, - {"Misra C: 21.22",""}, - {"Misra C: 21.23",""}, - {"Misra C: 21.24",""}, - {"Misra C: 21.25","warning"}, - {"Misra C: 21.26","warning"}, - {"Misra C: 21.3",""}, - {"Misra C: 21.4",""}, - {"Misra C: 21.5",""}, - {"Misra C: 21.6",""}, - {"Misra C: 21.7",""}, - {"Misra C: 21.8",""}, - {"Misra C: 21.9",""}, - {"Misra C: 22.10",""}, - {"Misra C: 22.11",""}, - {"Misra C: 22.12",""}, - {"Misra C: 22.13",""}, - {"Misra C: 22.14",""}, - {"Misra C: 22.15",""}, - {"Misra C: 22.16","warning"}, - {"Misra C: 22.17","warning"}, - {"Misra C: 22.18","warning"}, - {"Misra C: 22.19","warning"}, - {"Misra C: 22.20",""}, - {"Misra C: 22.5",""}, - {"Misra C: 22.7",""}, - {"Misra C: 22.8",""}, - {"Misra C: 22.9",""}, - {"Misra C: 23.1",""}, - {"Misra C: 23.2",""}, - {"Misra C: 23.3",""}, - {"Misra C: 23.4",""}, - {"Misra C: 23.5",""}, - {"Misra C: 23.6",""}, - {"Misra C: 23.7",""}, - {"Misra C: 23.8",""}, - {"Misra C: 3.1",""}, - {"Misra C: 3.2",""}, - {"Misra C: 4.1",""}, - {"Misra C: 4.2",""}, - {"Misra C: 5.1",""}, - {"Misra C: 5.10",""}, - {"Misra C: 5.2",""}, - {"Misra C: 5.3",""}, - {"Misra C: 5.4",""}, - {"Misra C: 5.5",""}, - {"Misra C: 5.6",""}, - {"Misra C: 5.7",""}, - {"Misra C: 6.1",""}, - {"Misra C: 6.2",""}, - {"Misra C: 6.3",""}, - {"Misra C: 7.1",""}, - {"Misra C: 7.2",""}, - {"Misra C: 7.3",""}, - {"Misra C: 7.4","style"}, - {"Misra C: 7.5",""}, - {"Misra C: 7.6",""}, - {"Misra C: 8.1",""}, - {"Misra C: 8.10",""}, - {"Misra C: 8.11",""}, - {"Misra C: 8.12",""}, - {"Misra C: 8.14",""}, - {"Misra C: 8.15",""}, - {"Misra C: 8.16",""}, - {"Misra C: 8.17",""}, - {"Misra C: 8.18",""}, - {"Misra C: 8.19",""}, - {"Misra C: 8.2",""}, - {"Misra C: 8.3",""}, - {"Misra C: 8.4",""}, - {"Misra C: 8.5",""}, - {"Misra C: 8.6",""}, - {"Misra C: 8.7",""}, - {"Misra C: 8.8",""}, - {"Misra C: 8.9",""}, - {"Misra C: 9.2",""}, - {"Misra C: 9.3",""}, - {"Misra C: 9.4",""}, - {"Misra C: 9.5",""}, - {"Misra C: 9.6",""}, - {"Misra C: 9.7",""}, - {"Misra C: Dir 1.2",""}, - {"Misra C: Dir 4.12",""}, - {"Misra C: Dir 4.3",""}, - {"Misra C: Dir 4.4",""}, - {"Misra C: Dir 4.5",""}, - {"Misra C: Dir 4.6",""}, - {"Misra C: Dir 4.7",""}, - {"Misra C: Dir 4.9",""}, - {"PremiumCheckBufferOverrun::addressOfPointerArithmetic","warning"}, - {"PremiumCheckBufferOverrun::negativeBufferSizeCheckedNonZero","warning"}, - {"PremiumCheckHang::infiniteLoop",""}, - {"PremiumCheckHang::infiniteLoopContinue",""}, - {"PremiumCheckOther::arrayPointerComparison","style"}, - {"PremiumCheckOther::invalidPointerLiteral",""}, - {"PremiumCheckOther::knownResult","style"}, - {"PremiumCheckOther::lossOfPrecision","style"}, - {"PremiumCheckOther::pointerCast","style"}, - {"PremiumCheckOther::reassignInLoop","style"}, - {"PremiumCheckOther::unreachableCode","style"}, - {"PremiumCheckOther::useAfterFree",""}, - {"PremiumCheckStrictAlias::strictAliasCondition","warning"}, - {"PremiumCheckUninitVar::uninitmember",""}, - {"PremiumCheckUninitVar::uninitvar",""}, - {"PremiumCheckUnusedVar::unreadVariable","style"}, - {"PremiumCheckUnusedVar::unusedPrivateMember","style"}, - {"PremiumMetrics::HIS::Call",""}, - {"PremiumMetrics::HIS::Calling",""}, - {"PremiumMetrics::HIS::Comment",""}, - {"PremiumMetrics::HIS::Goto",""}, - {"PremiumMetrics::HIS::Level",""}, - {"PremiumMetrics::HIS::Param",""}, - {"PremiumMetrics::HIS::Path",""}, - {"PremiumMetrics::HIS::Stmt",""}, - {"PremiumMetrics::HIS::StmtFile",""}, - {"PremiumMetrics::HIS::VOCF",""}, - {"PremiumMetrics::HIS::return",""}, - {"PremiumMetrics::cyclomaticComplexity",""}, - }; const char Req[] = "Required"; const char Adv[] = "Advisory"; diff --git a/lib/checkers.h b/lib/checkers.h index a9329d6c08f..e7dd4164570 100644 --- a/lib/checkers.h +++ b/lib/checkers.h @@ -40,7 +40,6 @@ enum class ReportType : std::uint8_t { namespace checkers { extern CPPCHECKLIB const std::map allCheckers; - extern CPPCHECKLIB const std::map premiumCheckers; struct CPPCHECKLIB MisraInfo { int a; diff --git a/tools/get_checkers.py b/tools/get_checkers.py index e2c9719bbfd..4594b773dc2 100644 --- a/tools/get_checkers.py +++ b/tools/get_checkers.py @@ -4,7 +4,6 @@ import re import requests - def print_checkers(glob_pattern:str): checkers = {} for filename in glob.glob(glob_pattern): @@ -49,11 +48,6 @@ def print_checkers(glob_pattern:str): print_checkers(os.path.expanduser('~/cppchecksolutions/cppcheck/lib/*.cpp')) print(" };\n") -print(' const std::map premiumCheckers{') -print_checkers(os.path.expanduser('~/cppchecksolutions/addon/src/*.cpp')) -print(' };') - - print(""" const char Req[] = "Required"; const char Adv[] = "Advisory"; From f78174514823d34a818e64115b41836531b2e11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 13 Feb 2026 17:05:14 +0100 Subject: [PATCH 2/5] cleanup --- lib/addoninfo.cpp | 22 ++++++++ lib/addoninfo.h | 2 + lib/checkersreport.cpp | 117 +++++++---------------------------------- 3 files changed, 43 insertions(+), 98 deletions(-) diff --git a/lib/addoninfo.cpp b/lib/addoninfo.cpp index a2426d91999..ed10435a368 100644 --- a/lib/addoninfo.cpp +++ b/lib/addoninfo.cpp @@ -114,6 +114,28 @@ static std::string parseAddonInfo(AddonInfo& addoninfo, const picojson::value &j } } + { + const auto it = obj.find("checkers"); + if (it != obj.cend()) { + const auto& val = it->second; + if (!val.is()) + return "Loading " + fileName + " failed. 'checkers' must be an array."; + for (const picojson::value &v : val.get()) { + if (!v.is()) + return "Loading " + fileName + " failed. 'checkers' entry is not an object."; + + const picojson::object& checkerObj = v.get(); + if (checkerObj.size() == 1) { + const std::string c = checkerObj.begin()->first; + if (!checkerObj.begin()->second.is()) + return "Loading " + fileName + " failed. 'checkers' entry requirement is not a string."; + const std::string req = checkerObj.begin()->second.get(); + addoninfo.checkers.emplace(c, req); + } + } + } + } + { const auto it = obj.find("executable"); if (it != obj.cend()) { diff --git a/lib/addoninfo.h b/lib/addoninfo.h index 592833c2162..dacb49be2df 100644 --- a/lib/addoninfo.h +++ b/lib/addoninfo.h @@ -22,6 +22,7 @@ #include "config.h" #include +#include struct CPPCHECKLIB AddonInfo { std::string name; @@ -31,6 +32,7 @@ struct CPPCHECKLIB AddonInfo { std::string python; // script interpreter bool ctu = false; std::string runScript; + std::map checkers; // checker name and its requirement std::string getAddonInfo(const std::string &fileName, const std::string &exename, bool debug = false); }; diff --git a/lib/checkersreport.cpp b/lib/checkersreport.cpp index a5135bed3f8..1b3e14cffe7 100644 --- a/lib/checkersreport.cpp +++ b/lib/checkersreport.cpp @@ -133,12 +133,15 @@ void CheckersReport::countCheckers() ++mActiveCheckersCount; ++mAllCheckersCount; } - for (const auto& checkReq: checkers::premiumCheckers) { - if (mActiveCheckers.count(checkReq.first) > 0) - ++mActiveCheckersCount; - ++mAllCheckersCount; + for (const auto& addonInfo: mSettings.addonInfos) { + for (const auto& checkReq: addonInfo.checkers) { + if (mActiveCheckers.count(checkReq.first) > 0) + ++mActiveCheckersCount; + ++mAllCheckersCount; + } } - if (mSettings.premiumArgs.find("misra-c-") != std::string::npos || mSettings.addons.count("misra")) { + + if (mSettings.addons.count("misra")) { const bool doUnusedFunctionOnly = Settings::unusedFunctionOnly(); for (const checkers::MisraInfo& info: checkers::misraC2012Rules) { const std::string rule = std::to_string(info.a) + "." + std::to_string(info.b); @@ -190,106 +193,24 @@ std::string CheckersReport::getReport(const std::string& criticalErrors) const fout << std::endl; } - const bool cppcheckPremium = mSettings.premium; - - auto reportSection = [&fout, cppcheckPremium] - (const std::string& title, - const Settings& settings, - const std::set& activeCheckers, - const std::map& premiumCheckers, - const std::string& substring) { + for (const auto& addonInfo: mSettings.addonInfos) { + if (addonInfo.checkers.empty()) + continue; fout << std::endl << std::endl; - fout << title << std::endl; - fout << std::string(title.size(), '-') << std::endl; - if (!cppcheckPremium) { - fout << "Not available, Cppcheck Premium is not used" << std::endl; - return; - } - int maxCheckerSize = 0; - for (const auto& checkReq: premiumCheckers) { - const std::string& checker = checkReq.first; - if (checker.find(substring) != std::string::npos && checker.size() > maxCheckerSize) - maxCheckerSize = checker.size(); - } - for (const auto& checkReq: premiumCheckers) { + fout << addonInfo.name << " checkers" << std::endl; + fout << std::string(addonInfo.name.size() + 9, '-') << std::endl; + + for (const auto& checkReq: addonInfo.checkers) { const std::string& checker = checkReq.first; - if (checker.find(substring) == std::string::npos) - continue; - std::string req = checkReq.second; - bool active = cppcheckPremium && activeCheckers.count(checker) > 0; - if (substring == "::") { - if (req == "warning") - active &= settings.severity.isEnabled(Severity::warning); - else if (req == "style") - active &= settings.severity.isEnabled(Severity::style); - else if (req == "portability") - active &= settings.severity.isEnabled(Severity::portability); - else if (!req.empty()) - active = false; // FIXME: handle req - } + const bool active = mActiveCheckers.count(checkReq.first) > 0; + const std::string& req = checkReq.second; fout << (active ? "Yes " : "No ") << checker; - if (!cppcheckPremium) { - if (!req.empty()) - req = "premium," + req; - else - req = "premium"; - } - if (!req.empty()) - req = "require:" + req; - if (!active) - fout << std::string(maxCheckerSize + 4 - checker.size(), ' ') << req; + if (!active && !req.empty()) + fout << std::string(maxCheckerSize + 4 - checker.size(), ' ') << "require:" + req; fout << std::endl; } - }; - - reportSection("Premium checkers", mSettings, mActiveCheckers, checkers::premiumCheckers, "::"); - reportSection("Autosar", mSettings, mActiveCheckers, checkers::premiumCheckers, "Autosar: "); - reportSection("Cert C", mSettings, mActiveCheckers, checkers::premiumCheckers, "Cert C: "); - reportSection("Cert C++", mSettings, mActiveCheckers, checkers::premiumCheckers, "Cert C++: "); - - const int misraCVersion = getMisraCVersion(mSettings); - - if (misraCVersion == 0) { - fout << std::endl << std::endl; - fout << "Misra C" << std::endl; - fout << "-------" << std::endl; - fout << "Misra is not enabled" << std::endl; - } else { - fout << std::endl << std::endl; - fout << "Misra C " << misraCVersion << std::endl; - fout << "------------" << std::endl; - for (const checkers::MisraInfo& info: checkers::misraC2012Directives) { - const std::string directive = "Dir " + std::to_string(info.a) + "." + std::to_string(info.b); - const bool active = isMisraRuleActive(mActiveCheckers, directive); - fout << (active ? "Yes " : "No ") << "Misra C " << misraCVersion << ": " << directive; - std::string extra; - if (misraCVersion == 2012 && info.amendment >= 1) - extra = " amendment:" + std::to_string(info.amendment); - if (!extra.empty()) - fout << std::string(10 - directive.size(), ' ') << extra; - fout << '\n'; - } - for (const checkers::MisraInfo& info: checkers::misraC2012Rules) { - const std::string rule = std::to_string(info.a) + "." + std::to_string(info.b); - const bool active = isMisraRuleActive(mActiveCheckers, rule); - fout << (active ? "Yes " : "No ") << "Misra C " << misraCVersion << ": " << rule; - std::string extra; - if (misraCVersion == 2012 && info.amendment >= 1) - extra = " amendment:" + std::to_string(info.amendment); - std::string reqs; - if (info.amendment >= 3) - reqs += ",premium"; - if (!active && !reqs.empty()) - extra += " require:" + reqs.substr(1); - if (!extra.empty()) - fout << std::string(10 - rule.size(), ' ') << extra; - fout << '\n'; - } } - reportSection("Misra C++ 2008", mSettings, mActiveCheckers, checkers::premiumCheckers, "Misra C++ 2008: "); - reportSection("Misra C++ 2023", mSettings, mActiveCheckers, checkers::premiumCheckers, "Misra C++ 2023: "); - return fout.str(); } From 5d64c9a6434747aa45a424209c03763f0d55e694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 13 Feb 2026 17:08:16 +0100 Subject: [PATCH 3/5] runformat --- lib/checkersreport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkersreport.cpp b/lib/checkersreport.cpp index 1b3e14cffe7..6f2e63c0ff7 100644 --- a/lib/checkersreport.cpp +++ b/lib/checkersreport.cpp @@ -193,7 +193,7 @@ std::string CheckersReport::getReport(const std::string& criticalErrors) const fout << std::endl; } - for (const auto& addonInfo: mSettings.addonInfos) { + for (const auto& addonInfo: mSettings.addonInfos) { if (addonInfo.checkers.empty()) continue; fout << std::endl << std::endl; From 82a674f937e21e2bded34ee3965f5f7e9696619a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 14 Feb 2026 08:18:45 +0100 Subject: [PATCH 4/5] fix test --- test/cli/other_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/cli/other_test.py b/test/cli/other_test.py index 744a68aac60..86a5c023bbc 100644 --- a/test/cli/other_test.py +++ b/test/cli/other_test.py @@ -4062,22 +4062,22 @@ def __test_active_checkers(tmp_path, active_cnt, total_cnt, use_misra=False, use def test_active_unusedfunction_only(tmp_path): - __test_active_checkers(tmp_path, 1, 975, use_unusedfunction_only=True) + __test_active_checkers(tmp_path, 1, 186, use_unusedfunction_only=True) def test_active_unusedfunction_only_builddir(tmp_path): checkers_exp = [ 'CheckUnusedFunctions::check' ] - __test_active_checkers(tmp_path, 1, 975, use_unusedfunction_only=True, checkers_exp=checkers_exp) + __test_active_checkers(tmp_path, 1, 186, use_unusedfunction_only=True, checkers_exp=checkers_exp) def test_active_unusedfunction_only_misra(tmp_path): - __test_active_checkers(tmp_path, 1, 1175, use_unusedfunction_only=True, use_misra=True) + __test_active_checkers(tmp_path, 1, 386, use_unusedfunction_only=True, use_misra=True) def test_active_unusedfunction_only_misra_builddir(tmp_path): checkers_exp = [ 'CheckUnusedFunctions::check' ] - __test_active_checkers(tmp_path, 1, 1175, use_unusedfunction_only=True, use_misra=True, checkers_exp=checkers_exp) + __test_active_checkers(tmp_path, 1, 386, use_unusedfunction_only=True, use_misra=True, checkers_exp=checkers_exp) From 3e0f4102562fa53a22328955671075f15a391d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 14 Feb 2026 12:35:26 +0100 Subject: [PATCH 5/5] 2 --- lib/checkersreport.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/checkersreport.cpp b/lib/checkersreport.cpp index 6f2e63c0ff7..a5d9c619cb3 100644 --- a/lib/checkersreport.cpp +++ b/lib/checkersreport.cpp @@ -197,8 +197,17 @@ std::string CheckersReport::getReport(const std::string& criticalErrors) const if (addonInfo.checkers.empty()) continue; fout << std::endl << std::endl; - fout << addonInfo.name << " checkers" << std::endl; - fout << std::string(addonInfo.name.size() + 9, '-') << std::endl; + std::string title; + if (mSettings.premium && addonInfo.name == "premiumaddon.json") + title = "Cppcheck Premium"; + else { + title = addonInfo.name; + if (endsWith(title, ".json")) + title.erase(title.rfind('.')); + } + title += " checkers"; + fout << title << std::endl; + fout << std::string(title.size(), '-') << std::endl; for (const auto& checkReq: addonInfo.checkers) { const std::string& checker = checkReq.first;