Skip to content

Commit ef1f11c

Browse files
committed
more robust substring checking
1 parent fb31080 commit ef1f11c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/errorlogger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ std::string getGuideline(const std::string &errId, ReportType reportType,
10441044
case ReportType::misraC2025:
10451045
if (errId.rfind("misra-c20", 0) == 0 || errId.rfind("premium-misra-c-20", 0) == 0)
10461046
guideline = errId.substr(errId.rfind('-') + 1);
1047-
if (errId.find("dir") != std::string::npos)
1047+
if (errId.find("-dir-") != std::string::npos)
10481048
guideline = "Dir " + guideline;
10491049
break;
10501050
case ReportType::misraCpp2008:

0 commit comments

Comments
 (0)