From a1035cf81494c3ab22c49b01788ca8ad933c5eb0 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sun, 26 Aug 2018 09:42:08 +0000 Subject: Add some tests for `ping_array`. No timeout test here yet, because we don't yet have the ability to manipulate time at will, so we would have to actually sleep. --- other/astyle/format-source | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'other') diff --git a/other/astyle/format-source b/other/astyle/format-source index 5e139d89..550bcf07 100755 --- a/other/astyle/format-source +++ b/other/astyle/format-source @@ -49,15 +49,25 @@ if grep '' */*.h; then exit 1 fi +CC_SOURCES=`find . '(' -name '*.cc' ')'` +CC_SOURCES="$CC_SOURCES toxcore/ping_array.c" + +for bin in clang-format-6.0 clang-format-5.0 clang-format; do + if which "$bin"; then + "$bin" -i -style='{BasedOnStyle: Google, ColumnLimit: 100}' $CC_SOURCES + break + fi +done + FIND="find ." -FIND="$FIND '(' -name '*.[ch]' -or -name '*.cpp' ')'" +FIND="$FIND '(' -name '*.[ch]' ')'" FIND="$FIND -and -not -name '*.api.h'" FIND="$FIND -and -not -wholename './super_donators/*'" FIND="$FIND -and -not -wholename './third_party/*'" FIND="$FIND -and -not -wholename './toxencryptsave/crypto_pwhash*'" -SOURCES=`eval "$FIND"` +C_SOURCES=`eval "$FIND"` -$ASTYLE -n --options=other/astyle/astylerc $SOURCES +$ASTYLE -n --options=other/astyle/astylerc $C_SOURCES git diff --exit-code -- cgit v1.2.3