diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-21 01:30:19 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-21 01:30:19 -0800 |
| commit | 44f983ef691112993710a5456ed6d15da1d51420 (patch) | |
| tree | a5ffcc4d761239bde260a522294b916ac0a59cc8 /etc | |
| parent | 5db7f0f969fb05cb0783acd187857b7b06b09b8b (diff) | |
| download | nng-44f983ef691112993710a5456ed6d15da1d51420.tar.gz nng-44f983ef691112993710a5456ed6d15da1d51420.tar.bz2 nng-44f983ef691112993710a5456ed6d15da1d51420.zip | |
Travis stuff for uncrustify.
Diffstat (limited to 'etc')
| -rwxr-xr-x | etc/uncrustify_check.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/etc/uncrustify_check.sh b/etc/uncrustify_check.sh new file mode 100755 index 00000000..881fd121 --- /dev/null +++ b/etc/uncrustify_check.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +PATH=${PATH}:/opt/pkg/bin export PATH +stat=0 +find src -name '*.[ch]' -print | while read file +do + uncrustify -c etc/uncrustify.cfg -lC -f $file | colordiff -u $file - + if [ $? -ne 0 ] + then + stat=1 + fi +done + +if [ $stat -ne 0 ] +then + echo "Format errors detect. Please fix." + exit 1 +fi +exit 0 |
