Add basic qml linter config

This commit is contained in:
Nicolas Werner 2023-10-26 21:03:36 +02:00
parent 2b1c9af311
commit d0c43eb872
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 77 additions and 1 deletions

View file

@ -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