gamemode/scripts/format-check.sh
Marc Di Luzio 53d15292c9 Fix the format check script by applying it to the previous commit
Rather than just to local changes, which doesn't work as intended
2018-04-16 17:52:48 +01:00

15 lines
429 B
Bash
Executable File

#!/bin/bash
# Simple script to check for clang-format compliance
wget https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/git-clang-format
chmod +x git-clang-format
CLANG_FORMAT_OUTPUT=$(./git-clang-format HEAD^ HEAD --diff)
if [[ ! $CLANG_FORMAT_OUTPUT == "no modified files to format" ]]; then
echo "Failed clang format check:"
echo "${CLANG_FORMAT_OUTPUT}"
exit 1
else
echo "Passed clang format check"
fi