forked from qt-creator/qt-creator
QmlJS checks: Add warning about 'eval'.
Migrated from QtChecker. Change-Id: I4b3e8993c7b9f697497d2199b24bf49379dbc1b4 Reviewed-on: http://codereview.qt-project.org/5860 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
@@ -1160,6 +1160,8 @@ bool Check::visit(CallExpression *ast)
|
||||
if (!name.isEmpty() && name.at(0).isUpper()) {
|
||||
addMessage(WarnExpectedNewWithUppercaseFunction, location);
|
||||
}
|
||||
if (cast<IdentifierExpression *>(ast->base) && name == QLatin1String("eval"))
|
||||
addMessage(WarnEval, location);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user