[Scripts] Add clang-format
This commit is contained in:
parent
8c992e539e
commit
96a0749d91
4 changed files with 173 additions and 168 deletions
16
Code/scripts/run_clang_format.sh
Normal file
16
Code/scripts/run_clang_format.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
|
||||
pushd "${SCRIPT_PATH}/.." > /dev/null
|
||||
|
||||
echo "Format all files using clang-format"
|
||||
|
||||
# We currently don't format test files
|
||||
find . ! -path "./build/*" ! -path "./test/*" \
|
||||
-type f \( -name "*.c" \
|
||||
-o -name "*.hpp" \) \
|
||||
-exec clang-format \
|
||||
-i -style=file {} \;
|
||||
|
||||
popd > /dev/null
|
Loading…
Add table
Add a link
Reference in a new issue