forked from qt-creator/qt-creator
QmlJS checks: Suppression of static analysis messages.
* Use '// @disable M123' to suppress * Add quick fix to add these comments Change-Id: I499f5a6004148afbb346218c6fb01c9ca77b9f73 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -218,6 +218,7 @@ Message::Message(Type type, AST::SourceLocation location, const QString &arg1, c
|
||||
qWarning() << "StaticAnalysis message" << type << "expects exactly two arguments";
|
||||
message = message.arg(arg1, arg2);
|
||||
}
|
||||
message.append(QString(" (M%1)").arg(QString::number(prototype.type)));
|
||||
}
|
||||
|
||||
bool Message::isValid() const
|
||||
@@ -242,3 +243,8 @@ DiagnosticMessage Message::toDiagnosticMessage() const
|
||||
diagnostic.message = message;
|
||||
return diagnostic;
|
||||
}
|
||||
|
||||
QString Message::suppressionString() const
|
||||
{
|
||||
return QString("@disable M%1").arg(QString::number(type));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user