aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljslogger.cpp
diff options
context:
space:
mode:
authorSami Shalayel <sami.shalayel@qt.io>2025-04-25 13:37:45 +0200
committerOlivier De Cannière <olivier.decanniere@qt.io>2025-05-16 17:00:01 +0200
commit6d86e944f059183c68c94b403ab098d60b349567 (patch)
treed2a66f36ea666a6dc77872ae032ce1a1ba3eb705 /src/qmlcompiler/qqmljslogger.cpp
parent1950f29b88047e1dbc1c402e91386c3443288269 (diff)
qmllint: implement WarnVoid
Warn about usages of the void keyword. This warning is off by default, mirroring the behavior of eslint. Task-number: QTBUG-129307 Change-Id: Iba1cc09e028d5053ef1aa28f01f1694efa5c250f Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljslogger.cpp')
-rw-r--r--src/qmlcompiler/qqmljslogger.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qmlcompiler/qqmljslogger.cpp b/src/qmlcompiler/qqmljslogger.cpp
index eecb822246..b6b11673cd 100644
--- a/src/qmlcompiler/qqmljslogger.cpp
+++ b/src/qmlcompiler/qqmljslogger.cpp
@@ -121,6 +121,7 @@ using namespace Qt::StringLiterals;
"Warn if var is used for storing functions", QtWarningMsg, false, false) \
X(qmlVarUsedBeforeDeclaration, "var-used-before-declaration", "VarUsedBeforeDeclaration", \
"Warn if a variable is used before declaration", QtWarningMsg, false, false) \
+ X(qmlVoid, "void", "Void", "Warn about void expressions.", QtWarningMsg, true, false) \
X(qmlWith, "with", "WithStatement", \
"Warn about with statements as they can cause false " \
"positives when checking for unqualified access", \