Skip to content

Commit 6513269

Browse files
committed
only match premium-* prefix for MISRA C++
1 parent 4686e54 commit 6513269

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lib/errorlogger.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,13 +1045,11 @@ 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)
1049-
guideline = errId.substr(15);
1050-
else if (errId.rfind("premium-misra-cpp-2008", 0) == 0)
1048+
if (errId.rfind("premium-misra-cpp-2008", 0) == 0)
10511049
guideline = errId.substr(23);
10521050
break;
10531051
case ReportType::misraCpp2023:
1054-
if (errId.rfind("misra-cpp-2023", 0) == 0 || errId.rfind("premium-misra-cpp-2023", 0) == 0)
1052+
if (errId.rfind("premium-misra-cpp-2023", 0) == 0)
10551053
guideline = errId.substr(errId.rfind('-') + 1);
10561054
break;
10571055
default:

0 commit comments

Comments
 (0)