mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
style(compiler): c++ formatting with github action (#22)
* style(compiler): c++ formatting with github action * style(compiler): update format script
This commit is contained in:
committed by
Quentin Bourgerie
parent
5164126447
commit
eef82a4713
14
.github/workflows/scripts/format_cpp.sh
vendored
Executable file
14
.github/workflows/scripts/format_cpp.sh
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
find ./compiler/{include,lib,src} \( -iname "*.h" -o -iname "*.cpp" -o -iname "*.cc" \) | xargs clang-format -i -style='file'
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# show changes if any
|
||||
git diff
|
||||
# fail if there is a diff, success otherwise
|
||||
! ( git diff | grep -q ^ ) || exit 1
|
||||
Reference in New Issue
Block a user