Skip to content

Commit 39170ce

Browse files
committed
fix #13964
1 parent 41f8f00 commit 39170ce

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/errorlogger.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,12 +1045,14 @@ std::string getGuideline(const std::string &errId, ReportType reportType,
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)