Skip to content
Snippets Groups Projects
Commit bac178f2 authored by Paul Gessinger's avatar Paul Gessinger Committed by Paul Gessinger
Browse files

allow overriding clang-format binary

parent daeb36bb
No related branches found
No related tags found
1 merge request!801Allow overriding clang-format binary with an env var
Pipeline #1507381 passed
......@@ -7,6 +7,7 @@
set -e # abort on error
if [ $# -ne 1 ]; then
echo "wrong number of arguments"
echo ""
......@@ -14,13 +15,15 @@ if [ $# -ne 1 ]; then
exit 1
fi
clang-format --version
_binary=${CLANG_FORMAT_BINARY:-clang-format}
$_binary --version
cd $1
find . \( -iname '*.cpp' -or -iname '*.hpp' -or -iname '*.ipp' \) \
-and -not -path "./*build*/*" \
-and -not -path "./thirdparty/*" \
| xargs clang-format -i -style=file
| xargs $_binary -i -style=file
if ! [ -z $CI ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment