forked from qt-creator/qt-creator
QmlJS: Add check for duplicated import
Add a soft check for duplicated Qml/JS imports which adds a warning when a file contains imports that duplicate the same URI / version or file path. Change-Id: Ib9a1f8a90dd3cf469d90e83abc1d748901b1e353 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
@@ -240,6 +240,8 @@ StaticAnalysisMessages::StaticAnalysisMessages()
|
||||
tr("Referencing the parent of the root item is not supported in a Qt Quick UI form."));
|
||||
newMsg(StateCannotHaveChildItem, Error,
|
||||
tr("A State cannot have a child item (%1)."), 1);
|
||||
newMsg(WarnDuplicateImport, Warning,
|
||||
tr("Duplicate import (%1)."), 1);
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
Reference in New Issue
Block a user