Add: clang format script

This commit is contained in:
Liyan Zheng 2022-08-09 19:50:23 +08:00
parent cc78a756e1
commit ce5d49c79b
1 changed files with 4 additions and 0 deletions

View File

@ -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