Clang script (#3085)

This commit is contained in:
Zach H 2018-02-06 08:45:13 -05:00 committed by GitHub
parent fcfb2b12b7
commit 35159ef61a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 2098 additions and 2054 deletions

18
clangify.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
# This script will run clang-format on all non-3rd-party C++/Header files.
set -e
if hash clang-format 2>/dev/null; then
find . \( -name "*.cpp" -o -name "*.h" \) \
-not -path "./cockatrice/src/qt-json/*" \
-not -path "./servatrice/src/smtp/*" \
-not -path "./common/sfmt/*" \
-not -path "./oracle/src/zip/*" \
-not -path "./build*/*" \
-exec clang-format -style=file -i {} \;
echo "Repository properly formatted"
else
echo "Please install clang-format to use this program"
fi