diff options
Diffstat (limited to 'contrib/checkSpace.pl')
-rwxr-xr-x | contrib/checkSpace.pl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/checkSpace.pl b/contrib/checkSpace.pl new file mode 100755 index 0000000000..435df10601 --- /dev/null +++ b/contrib/checkSpace.pl @@ -0,0 +1,25 @@ +#!/usr/bin/perl -w + +for $fn (@ARGV) { + open(F, "$fn"); + $lastnil = 0; + while (<F>) { + if (/\r/) { + print " CR:$fn:$.\n"; + } + if (/\t/) { + print " TAB:$fn:$.\n"; + } + if (/ +$/) { + print "Space\@EOL:$fn:$.\n"; + } + if ($lastnil && /^$/) { + print " DoubleNL:$fn:$.\n"; + } elsif (/^$/) { + $lastnil = 1; + } else { + $lastnil = 0; + } + } + close(F); +} |