Merge pull request #13974 from kaspar030/fix_uncrustify_logic

dist/tools/uncrustify/uncrustify.sh: fix uncrustify check logic
This commit is contained in:
José Alamos 2020-04-29 11:01:10 +02:00 committed by GitHub
commit 373a335ec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,11 +15,12 @@ FILES=$(changed_files | grep -xf "$WHITELIST" | grep -xvf "$BLACKLIST")
check () {
for F in $FILES
do
OUT="$(uncrustify -c "$UNCRUSTIFY_CFG" -f "$RIOTBASE/$F" --check 2> /dev/null)"
if [ "$OUT" ] ; then
uncrustify -c "$UNCRUSTIFY_CFG" -f "$RIOTBASE/$F" \
--check > /dev/null 2>&1 || {
echo "file $F needs to be uncrustified."
echo "Please run 'dist/tools/uncrustify/uncrustify.sh'"
exit 1
fi
}
done
echo "All files are uncrustified!"
}