From ce5d49c79b29b30b4c91548a98b5117d09f1ebb6 Mon Sep 17 00:00:00 2001 From: Liyan Zheng Date: Tue, 9 Aug 2022 19:50:23 +0800 Subject: [PATCH] Add: clang format script --- test/script/clang_format_inplace.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 test/script/clang_format_inplace.sh diff --git a/test/script/clang_format_inplace.sh b/test/script/clang_format_inplace.sh new file mode 100755 index 00000000..49b2e3d0 --- /dev/null +++ b/test/script/clang_format_inplace.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" &>/dev/null && pwd 2>/dev/null)" +PET_HOME="$(readlink -f ${script_dir}/../..)" +find ${PET_HOME}/src ${PET_HOME}/include ${PET_HOME}/test -iname *.h -o -iname *.cc | xargs clang-format -i