GUI: Fix warning ids and severities for clang/clang-tidy warnings
This commit is contained in:
parent
9f306cf3aa
commit
233a6d2fc6
|
@ -397,13 +397,21 @@ void CheckThread::parseClangErrors(const QString &tool, const QString &file0, QS
|
||||||
QString message,id;
|
QString message,id;
|
||||||
if (r2.exactMatch(r1.cap(5))) {
|
if (r2.exactMatch(r1.cap(5))) {
|
||||||
message = r2.cap(1);
|
message = r2.cap(1);
|
||||||
id = tool + '-' + r2.cap(2);
|
const QString id1(r2.cap(2));
|
||||||
if (r2.cap(2) == "performance")
|
if (id1.startsWith("clang"))
|
||||||
errorItem.severity = Severity::SeverityType::performance;
|
id = id1;
|
||||||
else if (r2.cap(2) == "portability")
|
else
|
||||||
errorItem.severity = Severity::SeverityType::portability;
|
id = tool + '-' + r2.cap(2);
|
||||||
else if (r2.cap(2) == "readability")
|
if (tool == CLANG_TIDY) {
|
||||||
errorItem.severity = Severity::SeverityType::style;
|
if (id1.startsWith("performance"))
|
||||||
|
errorItem.severity = Severity::SeverityType::performance;
|
||||||
|
else if (id1.startsWith("portability"))
|
||||||
|
errorItem.severity = Severity::SeverityType::portability;
|
||||||
|
else if (id1.startsWith("cert") || (id1.startsWith("misc") && !id1.contains("unused")))
|
||||||
|
errorItem.severity = Severity::SeverityType::warning;
|
||||||
|
else
|
||||||
|
errorItem.severity = Severity::SeverityType::style;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
message = r1.cap(5);
|
message = r1.cap(5);
|
||||||
id = CLANG_ANALYZER;
|
id = CLANG_ANALYZER;
|
||||||
|
|
Loading…
Reference in New Issue