mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-11 14:25:05 +00:00
b34c880f88
Automatically reformats the code before committing any changes using clang-format, to ensure that there are no additional reformatting commits needed in the future. This requires clang-format to be globally available to git, either through path or by directly being in the git bash directory. The hook will only run if a developer actually installs it with install.sh.
7 lines
247 B
Bash
7 lines
247 B
Bash
#!/bin/bash
|
|
if ! hash clang-format 2>/dev/null; then
|
|
echo "'clang-format' must be installed in a global environment."
|
|
exit 1
|
|
fi
|
|
|
|
find ./source -type f -name "*.h" -or -name "*.hpp" -or -name "*.c" -or -name "*.cpp" -exec clang-format -i '{}' \;
|