GNU make parser: Be more conservative about creating error tasks

We categorized all stderr output that did not include the string
"warning" as an error. Let's reverse the logic and check for well-known
error strings instead.

Fixes: QTCREATORBUG-22171
Change-Id: I7ac2b973acdc0fb1f45edb43cd25fd0cebb9c74d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Christian Kandeler
2019-04-02 11:07:48 +02:00
parent e618b158f8
commit e8b31d388d

View File

@@ -90,6 +90,18 @@ public:
Task::TaskType type = Task::Error;
};
static Task::TaskType taskTypeFromDescription(const QString &description)
{
if (description.contains(". Stop."))
return Task::Error;
if (description.contains("not found"))
return Task::Error;
if (description.contains("No rule to make target"))
return Task::Error;
// Extend as needed.
return Task::Warning;
}
static Result parseDescription(const QString &description)
{
Result result;
@@ -103,7 +115,7 @@ static Result parseDescription(const QString &description)
result.isFatal = true;
} else {
result.description = description;
result.type = Task::Error;
result.type = taskTypeFromDescription(description);
result.isFatal = false;
}
return result;