Debian Codegraph @

.ci/format.sh

raw symbols SCIP
1 #!/usr/bin/env sh
2
3 # Runs the Clang Formatter
4 # Return codes:
5 # - 1 there are files to be formatted
6 # - 0 everything looks fine
7
8 set -eu
9
10 FILES=$(find src -type f \( -iname "*.cpp" -o -iname "*.h" \))
11 QML_FILES=$(find resources/qml -type f \( -iname "*.qml" \))
12
13 for f in $FILES
14 do
15 clang-format -i "$f"
16 done;
17
18 git diff --exit-code
19
20 ./scripts/includemocs.py --insert-at-end -n src
21
22 if command -v /usr/lib64/qt6/bin/qmllint &> /dev/null; then
23 /usr/lib64/qt6/bin/qmllint $QML_FILES
24 elif command -v /usr/lib/qt6/bin/qmllint &> /dev/null; then
25 /usr/lib/qt6/bin/qmllint $QML_FILES
26 else
27 echo "No qmllint found, skipping check!"
28 fi