.svg files were not treated as binary which means they were spamming up the diff log. Bash files were not being pulled with LF line endings, which means they couldn't be run by Windows Subsystem for Linux. Bash files were renamed .sh to easily allow them to be recognized by both .gitattributes and humans. Taken from https://github.com/alexkaratarakis/gitattributes.
17 lines
481 B
Bash
17 lines
481 B
Bash
#!/usr/bin/env bash
|
|
|
|
clang-format --version
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "Clang-format found."
|
|
build_path="`dirname \"$0\"`"
|
|
project_path=$build_path/../..
|
|
|
|
find $project_path/src/ -regex '.*\.\(cpp\|h\)' -exec clang-format -style=file -i {} \; -exec echo "Iteration 1: {}" \;
|
|
find $project_path/src/ -regex '.*\.\(cpp\|h\)' -exec clang-format -style=file -i {} \; -exec echo "Iteration 2: {}" \;
|
|
echo "DONE"
|
|
else
|
|
echo "Could not find clang-format."
|
|
fi
|
|
|