@@ -1974,26 +1974,28 @@ void CppCheck::analyseClangTidy(const FileSettings &fileSettings)
19741974 const std::string errorString = line.substr (endErrorPos, line.length ());
19751975
19761976 std::string fixedpath = Path::simplifyPath (line.substr (0 , endNamePos));
1977+ fixedpath = Path::toNativeSeparators (std::move (fixedpath));
19771978 const auto lineNumber = strToInt<int64_t >(lineNumString);
19781979 const auto column = strToInt<int64_t >(columnNumString);
1979- fixedpath = Path::toNativeSeparators (std::move (fixedpath));
19801980
19811981 ErrorMessage errmsg;
19821982 errmsg.callStack .emplace_back (fixedpath, lineNumber, column);
1983-
1984- errmsg.id = " clang-tidy-" + errorString.substr (1 , errorString.length () - 2 );
1985- if (errmsg.id .find (" performance" ) != std::string::npos)
1986- errmsg.severity = Severity::performance;
1987- else if (errmsg.id .find (" portability" ) != std::string::npos)
1988- errmsg.severity = Severity::portability;
1989- else if (errmsg.id .find (" cert" ) != std::string::npos || errmsg.id .find (" misc" ) != std::string::npos || errmsg.id .find (" unused" ) != std::string::npos)
1990- errmsg.severity = Severity::warning;
1991- else
1992- errmsg.severity = Severity::style;
1993-
19941983 errmsg.file0 = std::move (fixedpath);
19951984 errmsg.setmsg (trim (messageString));
1996- mErrorLogger .reportErr (errmsg);
1985+
1986+ for (const auto & id : splitString (errorString.substr (1 , errorString.length () - 2 ), ' ,' )) {
1987+ errmsg.id = " clang-tidy-" + id;
1988+ if (errmsg.id .find (" performance" ) != std::string::npos)
1989+ errmsg.severity = Severity::performance;
1990+ else if (errmsg.id .find (" portability" ) != std::string::npos)
1991+ errmsg.severity = Severity::portability;
1992+ else if (errmsg.id .find (" cert" ) != std::string::npos || errmsg.id .find (" misc" ) != std::string::npos || errmsg.id .find (" unused" ) != std::string::npos)
1993+ errmsg.severity = Severity::warning;
1994+ else
1995+ errmsg.severity = Severity::style;
1996+
1997+ mErrorLogger .reportErr (errmsg);
1998+ }
19971999 }
19982000}
19992001
0 commit comments