From ba47e42472bc5352dd73da24bc14e0f25cabc5dc Mon Sep 17 00:00:00 2001 From: Sergei Ianovich Date: Sat, 3 Dec 2022 14:59:40 +0300 Subject: [PATCH] CI format test --- .github/format.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 .github/format.sh diff --git a/.github/format.sh b/.github/format.sh new file mode 100755 index 000000000..5abda2b26 --- /dev/null +++ b/.github/format.sh @@ -0,0 +1,9 @@ +#!/bin/bash -efux + +PREFIX=$HOME/opt +PATH=$PREFIX/bin:$PATH + +list=$(git ls-tree --name-only -r HEAD | grep -v ecp_id_.* | grep -v gost_grasshopper_precompiled.c | grep '[.][ch]$') +clang-format -i $list +diffLen=$(git diff | wc -l) +test 0 -eq $diffLen || exit 1