annoying
This commit is contained in:
parent
8a2137d5d3
commit
8d1db69e0d
@ -31,14 +31,14 @@ fi
|
|||||||
|
|
||||||
cpp_format="clang-format"
|
cpp_format="clang-format"
|
||||||
file_selectors="-iname *.h -o -iname *.cpp -o -iname *.c -o -iname *.tpp"
|
file_selectors="-iname *.h -o -iname *.cpp -o -iname *.c -o -iname *.tpp"
|
||||||
file_excludes="-not -path '**/translateObjects.cpp' -not -path '**/translateEvents.cpp'"
|
file_excludes="-not -path */translateObjects.cpp -not -path */translateEvents.cpp"
|
||||||
if command -v ${cpp_format} &> /dev/null; then
|
if command -v ${cpp_format} &> /dev/null; then
|
||||||
for dir in ${folder_list[@]}; do
|
for dir in ${folder_list[@]}; do
|
||||||
echo "Auto-formatting C/C++ files in ${dir} recursively"
|
echo "Auto-formatting C/C++ files in ${dir} recursively"
|
||||||
find ${dir} ${file_excludes} ${file_selectors} | xargs ${cpp_format} --style=file -i
|
find ${dir} ${file_excludes} ${file_selectors} | xargs ${cpp_format} --style=file -i
|
||||||
done
|
done
|
||||||
find ./unittest ${file_selectors} -o -type d -name build -prune | \
|
find ./unittest ${file_selectors} -o -type d -name build -prune | \
|
||||||
xargs clang-format --style=file -i
|
xargs ${cpp_format} --style=file -i
|
||||||
else
|
else
|
||||||
echo "No ${cpp_format} tool found, not formatting C++/C files"
|
echo "No ${cpp_format} tool found, not formatting C++/C files"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user