1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00

fix clang-format script

This commit is contained in:
dark64 2020-04-07 16:02:18 +02:00
parent 07041e92e2
commit 2af231bf3b
2 changed files with 5 additions and 13 deletions

View file

@ -155,6 +155,7 @@ workflows:
requires:
- build
- test
- cpp_test
- wasm_test
- integration_test
- zokrates_js_build

11
scripts/clang-format.sh Normal file → Executable file
View file

@ -1,17 +1,8 @@
#!/bin/bash
# Usage: ./clang-format.sh zokrates_core/lib
dir=$1
ret=0
for file in $dir/*.cpp $dir/*.hpp; do
clang-format -i -style=WebKit -verbose $file
out=$(git diff --exit-code $file)
if [ $? -ne 0 ]; then
ret=1
echo "ERROR: clang-format diff in: $file"
echo "$out"
fi
done
exit $ret