Update Travis and check_whitespace.sh.

This commit is contained in:
Markus F.X.J. Oberhumer
2017-07-23 02:22:42 +02:00
parent ef8a7f330d
commit ef78d23494
4 changed files with 7 additions and 2 deletions
+4 -1
View File
@@ -13,12 +13,15 @@ find . \
-type d -name 'tmp*' -prune -o \
-type f -iname '*.bat' -prune -o \
-type f -iname '*.exe' -prune -o \
-type f -iname '*.o' -prune -o \
-type f -iname '*.obj' -prune -o \
-type f -iname '*.out' -prune -o \
-type f -iname '*.pdf' -prune -o \
-type f -iname '*.swp' -prune -o \
-type f -print0 | \
LC_ALL=C sort -z | xargs -0r perl -n -e '
#print("$ARGV\n");
if (m,[\x00\x01\x02\xfe\xff],) { print "ERROR: binary file detected $ARGV: $_"; exit(1); }
if (m,[\x00\x01\x02\x7f\xfe\xff],) { print "ERROR: binary file detected $ARGV: $_"; exit(1); }
if (m,[\r\x1a],) { print "ERROR: DOS EOL detected $ARGV: $_"; exit(1); }
if (m,([ \t]+)$,) {
# allow exactly two trailing spaces for GitHub flavoured Markdown in .md files
+1 -1
View File
@@ -15,7 +15,7 @@ git ls-files --full-name -z | perl -0 -n -e '
else { print; }
' | LC_ALL=C sort -z | xargs -0r perl -n -e '
#print("$ARGV\n");
if (m,[\x00\x01\x02\xfe\xff],) { print "ERROR: binary file detected $ARGV: $_"; exit(1); }
if (m,[\x00\x01\x02\x7f\xfe\xff],) { print "ERROR: binary file detected $ARGV: $_"; exit(1); }
if (m,[\r\x1a],) { print "ERROR: DOS EOL detected $ARGV: $_"; exit(1); }
if (m,([ \t]+)$,) {
# allow exactly two trailing spaces for GitHub flavoured Markdown in .md files