aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmllint/checkidentifiers.h
Commit message (Collapse)AuthorAgeFilesLines
* qmllint: Remove checkidentifiersMaximilian Goldstein2021-08-051-72/+0
| | | | | | | Since all of the warnings have been moved out of checkidentifiers we can now simply remove it. Change-Id: Ie59e306b69ca397c1e191a0fe379bc084f98cf73 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Move a lot of warning logic to qmlcompilerMaximilian Goldstein2021-06-091-9/+5
| | | | | | | | | | Moves the majority of qmllint warning logic to qmlcompiler, making them available to all tools using the library. The end goal is to get rid off the additional AST visitor in qmllint altogether (We can't quite yet until we have ported over type interference). This also prepares qmlcompiler to move to a two pass approach which isn't fully implemented in here yet due to the size of the change. Pick-to: 6.2 Change-Id: Id2e108340d26a75085ce6ed97d56dec03ea3a12d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlcompiler/qmllint: Use unified loggerMaximilian Goldstein2021-03-291-9/+7
| | | | | | | | | | Improves the logging situation greatly by allowing all logging messages to be assigned different severities, highlighting the code that caused them and by now ensuring a qmllint warning will always result in a non-zero exit code. A later patch will expose more of these options to the user. Change-Id: Id9b036fe3ba80dd18e9f8cb1b05efa891713d5a8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Rename QmlJSImporterUlf Hermann2020-10-051-3/+3
| | | | | | | Add an extra 'Q' for consistency. Change-Id: Idd34e0c898c9a7ac70b1ec3856a8af6829ec6fb7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Rename metatypes_p.hUlf Hermann2020-10-051-2/+2
| | | | | | | Those are specific to QML/JS. Change-Id: I45a5d4eb6c53bd5ca4026e042af83c4afaa4953c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Rename ScopeTree to QQmlJSScopeUlf Hermann2020-10-051-5/+5
| | | | | | | That is a better name. Change-Id: I34a6867692a236dd16ed8e3a68866f994eab02d2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Long live libQtQmlCompiler!Ulf Hermann2020-10-051-2/+2
| | | | | | | | Move all the code from tools/shared into src/qmlcompiler and build a static library from it so that we can re-use it in external tools. Change-Id: I7c8d8e59063dc7c711f4072f103a01095e6f5997 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Remove member access chains from ScopeTreeUlf Hermann2020-10-021-1/+11
| | | | | | | | | What we need there is a proper type inference. This should be added separately. For now, keep the member access chains local in qmllint and don't pollute ScopeTree with them. Change-Id: I9f50aa4e54b285bd93e7bd4cd17797509df0c168 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Remove ScopeTree::m_unmatchedSignalHandlersUlf Hermann2020-10-021-1/+3
| | | | | | | | Rather, immediately output the warnings when we encounter them. Change-Id: I4bd1a5491a47cb0232bfdd4e325f8f122593aa39 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Unify injected and "normal" JavaScript identifiersUlf Hermann2020-10-021-1/+7
| | | | | | | | The specifics of how to warn about the injected identifiers are moved out of ScopeTree as that is not related to the structure of the scopes. Change-Id: I26418c3fa492da8339abf045a4034a8464b7bbb8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Move the import handling code out of qmllintUlf Hermann2020-10-021-2/+2
| | | | | | | We want to re-use this logic in other places. Change-Id: I63cbee86a83265ddd241a4fae9ce8c48f38b5f18 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* TypeDescriptionReader: Don't export C++ names as QML namesUlf Hermann2020-09-251-3/+4
| | | | | | | | | | | | | | This is just wrong. The types are not visible in QML under their C++ names. Indeed, this way we reveal a number of places where we confuse the names. Fix those in turn. Furthermore, one of the tests was incorrect. The qmltypes files did not contain an export entry for one of the types, and therefore the type was formally anonymous in QML. However, we did access it via its C++ name. Fix that by exporting the C++ name. Change-Id: I8dd96334076b90fb174daf5b285d622f96495f56 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Split available names into exported, imported, C++ namesUlf Hermann2020-09-251-2/+2
| | | | | | | | | | exported names are the names a component intends to export. imported names are the names the importing component sees, possibly adding a prefix. C++ names are only used in qmltypes files for non-composite types. Change-Id: I843e34f07a026a06931ed76d72a3cce98e3e5552 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: high level item can also be listEvgeniy A. Dushistov2020-06-181-1/+2
| | | | | | | Fixes: QTBUG-84300 Change-Id: I1a9db060cdeb7c4ec10deedab5141a06245a55b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmllint: Show filename in addition to line and columnFabian Kosmale2020-04-241-2/+3
| | | | | | Fixes: QTBUG-83684 Change-Id: If15a9498ae223dccfbafe88b14453a4b180247d9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmllint: Consistently use shared pointers for ScopeTreeUlf Hermann2020-04-011-3/+3
| | | | | | | | | | ScopeTree keeps a weak pointer to its parent scope and strong shared pointers to its children. Avoid passing bare pointers around, so that we cannot create multiple shared pointers independently from the same bare pointer. Change-Id: Id0faece550b1878363004d843a8fa5c1164794ae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Move qmllint's metatype support to tools/sharedUlf Hermann2020-04-011-0/+57
We want to read qmltypes files and analyze scopes also from other tools. Furthermore, restructure the shared directory, so that each tool only includes what it needs. Change-Id: I96a2dcc8b1c5fac613592fb1867bf51fa5ef3a6e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>