2022-11-08 18:17:21 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
source $(dirname $0)/env.sh
|
|
|
|
|
|
|
|
cd $LUNA_ROOT
|
|
|
|
|
2023-04-23 08:53:34 +00:00
|
|
|
source tools/sources.sh
|
2022-11-08 18:17:21 +00:00
|
|
|
|
|
|
|
ALL_OK=1
|
|
|
|
|
|
|
|
for f in ${SOURCES[@]}
|
|
|
|
do
|
2022-12-05 18:02:23 +00:00
|
|
|
clang-format -n $f 2>&1 | grep -q ^
|
|
|
|
RESULT=$?
|
2022-12-05 18:07:01 +00:00
|
|
|
if [ "$RESULT" -eq "0" ]
|
2022-11-08 18:17:21 +00:00
|
|
|
then
|
|
|
|
echo "File $f needs formatting"
|
|
|
|
ALL_OK=0
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ $ALL_OK = "1" ]
|
|
|
|
then
|
|
|
|
echo "All files OK"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2023-03-11 09:38:34 +00:00
|
|
|
exit 1
|