Skip to content

Commit

Permalink
Add do_format.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
dskyle-shieldai authored and dskyle committed Oct 1, 2018
1 parent d52253d commit ba15fe2
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions scripts/linux/do_format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

FILE_ROOTS=(
include/madara/
tests
tools
port/python/src
port/java/jni
)

if which clang-format-5.0 >& /dev/null; then true; else
echo Install clang-format-5.0 package
exit 1
fi

cd $MADARA_ROOT

find "${FILE_ROOTS[@]}" -name '*.h' -o -name '*.cpp' -o -name '*.inl' |
xargs -- clang-format-5.0 -i -style=file "$@"

0 comments on commit ba15fe2

Please sign in to comment.