Skip to content

Commit c84700e

Browse files
committed
fix #13964
1 parent f3447b4 commit c84700e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lib/errorlogger.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,16 +1041,18 @@ std::string getGuideline(const std::string &errId, ReportType reportType,
10411041
case ReportType::misraC2012:
10421042
case ReportType::misraC2023:
10431043
case ReportType::misraC2025:
1044-
if (errId.rfind("misra-c20", 0) == 0 || errId.rfind("premium-misra-c-20", 0) == 0)
1044+
if (errId.rfind("misra-c-20", 0) == 0 || errId.rfind("premium-misra-c-20", 0) == 0)
10451045
guideline = errId.substr(errId.rfind('-') + 1);
10461046
break;
10471047
case ReportType::misraCpp2008:
1048-
if (errId.rfind("misra-cpp-2008-", 0) == 0)
1048+
if (errId.rfind("misra-cpp-2008", 0) == 0)
10491049
guideline = errId.substr(15);
1050+
else if (errId.rfind("premium-misra-cpp-2008", 0) == 0)
1051+
guideline = errId.substr(23);
10501052
break;
10511053
case ReportType::misraCpp2023:
1052-
if (errId.rfind("misra-cpp-2023-", 0) == 0)
1053-
guideline = errId.substr(15);
1054+
if (errId.rfind("misra-cpp-2023", 0) == 0 || errId.rfind("premium-misra-cpp-2023", 0) == 0)
1055+
guideline = errId.substr(errId.rfind('-') + 1);
10541056
break;
10551057
default:
10561058
break;

0 commit comments

Comments
 (0)