Skip to content

Commit ba47e42

Browse files
committed
CI format test
1 parent 044f359 commit ba47e42

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/format.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash -efux
2+
3+
PREFIX=$HOME/opt
4+
PATH=$PREFIX/bin:$PATH
5+
6+
list=$(git ls-tree --name-only -r HEAD | grep -v ecp_id_.* | grep -v gost_grasshopper_precompiled.c | grep '[.][ch]$')
7+
clang-format -i $list
8+
diffLen=$(git diff | wc -l)
9+
test 0 -eq $diffLen || exit 1

0 commit comments

Comments
 (0)