diff options
Diffstat (limited to 'util/style.sh')
| -rwxr-xr-x | util/style.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/style.sh b/util/style.sh index c892f7d..dfef6e5 100755 --- a/util/style.sh +++ b/util/style.sh @@ -12,6 +12,8 @@ if [ ! -f $1 ]; then exit 1 fi +echo "Checking file" $1 + # Message about trailing space before EOL eolerrors=$(grep -n "\s$" "$1" | cut -f1 -d: | while read -r line; do @@ -22,7 +24,7 @@ done) # Message about non-empty last-line -linecount=$(($(wc -l "$1" | cut -f1 -d " ") + 1)) +linecount=$(($(wc -l "$1" | xargs | cut -f1 -d " ") + 1)) lastline=$(tail -n "+$linecount" $1) llerrors=$(if [ "$lastline" ]; then |
