Support clang tidy (#2512)

This commit is contained in:
fuzzelhjb 2020-01-31 14:10:27 +01:00 committed by GitHub
parent 4690a9a25d
commit b0ce3e4c0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1398,6 +1398,8 @@ void CppCheck::analyseClangTidy(const ImportProject::FileSettings &fileSettings
const std::size_t endNamePos = line.rfind(":", endLinePos - 1);
const std::size_t endMsgTypePos = line.find(':', endColumnPos + 2);
const std::size_t endErrorPos = line.rfind('[', std::string::npos);
if(endLinePos==std::string::npos || endNamePos==std::string::npos || endMsgTypePos==std::string::npos || endErrorPos==std::string::npos)
continue;
const std::string lineNumString = line.substr(endNamePos + 1, endLinePos - endNamePos - 1);
const std::string columnNumString = line.substr(endLinePos + 1, endColumnPos - endLinePos - 1);