added ci scripts for rust

This commit is contained in:
Simon Wörner
2017-03-30 21:55:00 +02:00
parent d877ec774f
commit 80934a5c70
4 changed files with 44 additions and 2 deletions

13
ci/run-rustfmt.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
ERROR=0
while IFS= read -r -d '' f; do
echo "${f}"
if [ "$(rustfmt --write-mode=diff "$f")" != $'' ] ; then
ERROR=1
fi
done < <(find . -type f -name '*.rs' -print0)
exit ${ERROR}