fix clang-format script
This commit is contained in:
parent
07041e92e2
commit
2af231bf3b
2 changed files with 5 additions and 13 deletions
|
@ -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
11
scripts/clang-format.sh
Normal file → Executable 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
|
Loading…
Reference in a new issue