lint: improve whitespace test

The whitespace test only trips on files that are part
of the git index - in particular not temporary editor
files or other cruft that doesn't hurt anyone.

Change-Id: I793fcc773845ee02281d8614b07e9c5958126a5a
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/6582
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
Patrick Georgi 2014-08-10 19:07:09 +02:00
parent f3155d205e
commit 4b65c2ad33
1 changed files with 1 additions and 20 deletions

View File

@ -19,25 +19,6 @@
# DESCR: Check for superfluous whitespace in the tree # DESCR: Check for superfluous whitespace in the tree
LC_ALL=C export LC_ALL LC_ALL=C export LC_ALL
find src util -name .svn -type d -prune -o \ grep -l "[[:space:]][[:space:]]*$" `git ls-files src util |egrep -v "(^3rdparty|^src/vendorcode/|^util/kconfig/|\<COPYING\>|\<LICENSE\>|\<README\>|_shipped$|\.patch$)"` | \
-type f -perm /111 -prune -o \
-name .git -type d -prune -o \
-name README -prune -o \
-name LICENSE -prune -o \
-name TODO -prune -o \
-name COPYING -prune -o \
-name \*.txt -prune -o \
-name \*.exe -prune -o \
-name \*.o -prune -o \
-name microcode-\*.h -prune -o \
-name \*.?_shipped -prune -o \
-name \*.[18] -prune -o \
-name \*~ -prune -o \
-name kconfig -type d -prune -o \
-name romcc -type d -prune -o \
-name crossgcc -type d -prune -o \
-name vendorcode -type d -prune -o \
-type f -exec \
grep -l "[[:space:]][[:space:]]*$" {} + | \
sed -e "s,^.*$,File & has lines ending with whitespace.," sed -e "s,^.*$,File & has lines ending with whitespace.,"