Add clang-format-all.sh to format all project sources
This commit is contained in:
parent
1be9bb6712
commit
8633abaf88
7
clang-format-all.sh
Executable file
7
clang-format-all.sh
Executable file
@ -0,0 +1,7 @@
|
||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
SRC_DIR=${ROOT_DIR}/src
|
||||
CLANG_FORMAT=${CLANG_FORMAT:-clang-format}
|
||||
|
||||
# Double clang-format, as it seems that one pass isn't always enough
|
||||
find ${SRC_DIR} -iname "*.h" -o -iname "*.cpp" | xargs ${CLANG_FORMAT} -i -style=file
|
||||
find ${SRC_DIR} -iname "*.h" -o -iname "*.cpp" | xargs ${CLANG_FORMAT} -i -style=file
|
Loading…
x
Reference in New Issue
Block a user