You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/tools/clang-format-check

11 lines
240 B

#!/bin/sh
error=0
for f in $*; do
changes=$(clang-format -output-replacements-xml "$f" | grep -c '^<replacement ')
if test "$changes" -gt 0; then
echo "$f ... $changes changes needed"
error=1
fi
done
exit $error