Computergraphik_Hopp/Code/scripts/run_clang_format.sh

17 lines
364 B
Bash
Raw Normal View History

2018-10-31 14:45:06 +01:00
#!/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