summary refs log tree commit diff
path: root/.ci
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-10-26 21:03:36 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-10-26 21:10:58 +0200
commitd0c43eb872685988ed9979788f6d143c931f4512 (patch)
tree74ae6d6d176beddb57ad65510690a94dbd6da657 /.ci
parentMore qml cleanups (diff)
downloadnheko-d0c43eb872685988ed9979788f6d143c931f4512.tar.xz
Add basic qml linter config
Diffstat (limited to '.ci')
-rwxr-xr-x.ci/format.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/.ci/format.sh b/.ci/format.sh
index cc4a3b82..20c1d126 100755
--- a/.ci/format.sh
+++ b/.ci/format.sh
@@ -8,6 +8,7 @@
 set -eu
 
 FILES=$(find src -type f \( -iname "*.cpp" -o -iname "*.h" \))
+QML_FILES=$(find resources/qml -type f \( -iname "*.qml"  \))
 
 for f in $FILES
 do
@@ -15,3 +16,11 @@ do
 done;
 
 git diff --exit-code
+
+if command -v /usr/lib64/qt6/bin/qmllint &> /dev/null; then
+    /usr/lib64/qt6/bin/qmllint $QML_FILES
+elif command -v /usr/lib/qt6/bin/qmllint &> /dev/null; then
+    /usr/lib/qt6/bin/qmllint $QML_FILES
+else
+    echo "No qmllint found, skipping check!"
+fi