Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.5.3, 6.7.0
-
None
-
Windows 10 with qmllint from Qt 6.5.3 or 6.7.0 (installed from the Maintenance tool)
Description
The repository structure I work on has a structure similar to the following:
qmllint-ini-paths |- .qmllint.ini |- src | |- Main.qml |- submodules | |- a | | |- qmldir | | |- X.qml
There is a main code directory, and then some submodules under a different path which also contains QML files.
If I run qmllint using
qmllint -I submodules/ src/Main.qml
then everything works fine. However, if I put
AdditionalQmlImportPaths=submodules
in the .qmllint.ini file, and run
qmllint src/Main.qml
then I get errors about imports not found (the imports are like import a). Looking at the qmllint code, I think it takes paths from .qmllint.ini files as relative to the QML file it is currently checking (https://code.qt.io/cgit/qt/qtdeclarative.git/tree/tools/qmllint/main.cpp?h=dev#n396), which makes relative paths impossible to use correctly if the QML files being checked are at different subdirectory levels.
I think it would make more sense to make them relative to the .qmllint.ini file that specified each additional path, but making it relative to the CWD of the qmllint call would also work in my case.