mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 20:25:34 -05:00
fix(ci): fix formatting script
seems like big diffs weren't catched. Now we use ifne which checks if the stdin isn't empty
This commit is contained in:
2
.github/workflows/continuous-integration.yml
vendored
2
.github/workflows/continuous-integration.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
- name: Format with clang-format
|
||||
run: .github/workflows/scripts/format_cpp.sh
|
||||
run: sudo apt install moreutils && .github/workflows/scripts/format_cpp.sh
|
||||
|
||||
CheckLicense:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
4
.github/workflows/scripts/format_cpp.sh
vendored
4
.github/workflows/scripts/format_cpp.sh
vendored
@@ -9,6 +9,6 @@ then
|
||||
fi
|
||||
|
||||
# show changes if any
|
||||
git diff
|
||||
git --no-pager diff
|
||||
# fail if there is a diff, success otherwise
|
||||
! ( git diff | grep -q ^ ) || exit 1
|
||||
git diff | ifne exit 1
|
||||
|
||||
Reference in New Issue
Block a user