forked from qt-creator/qt-creator
qmljs: add check for comparisons not depending on values
currently we mainly try to warn about primitive == null/undefined or primitive === non primitive. There are other that we could warn about null==null null==undefined, but I feel that they might be triggered too much by clean code. Change-Id: Id43d838d60a4e13f361be34e4bb38211777a081e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
@@ -247,6 +247,8 @@ StaticAnalysisMessages::StaticAnalysisMessages()
|
||||
tr("Hit maximum recursion limit when visiting AST."));
|
||||
newMsg(ErrTypeIsInstantiatedRecursively, Error,
|
||||
tr("Type cannot be instantiated recursively (%1)."), 1);
|
||||
newMsg(WarnLogicalValueDoesNotDependOnValues, Warning,
|
||||
tr("Logical value does not depend on actual values"));
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
Reference in New Issue
Block a user