IAP GITLAB

Skip to content
Snippets Groups Projects
Commit b720e63a authored by ralfulrich's avatar ralfulrich
Browse files

added more options and better output

parent 9652e6f3
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,12 @@ command="clang-format -style=file `find . -iregex '^.*\.\(cc\|h\)$' -not -path '
if [ "$1" == "check" ];
then
! ${command} -output-replacements-xml | grep -c "<replacement "
else
`! ${command} -output-replacements-xml | grep -qc "<replacement "` || \
{ echo "format-check FAILED!"; exit $ERRCODE; }
echo "Congratulations: format-check succeeded"
elif [ "$1" == "apply" ];
then
${command} -i
else
echo "please use: ./do-clang-format.sh [check] or [apply]"
fi
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