Skip to content

Commit 1eedefb

Browse files
committed
more robust substring checking
1 parent 5b0fe62 commit 1eedefb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/errorlogger.cpp

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

0 commit comments

Comments
 (0)