util/lint: Ignore whitespace, newlines, and licenses in vbt files
Change-Id: I84f612db058d83936ddd5a6baa32c993e5b0f594 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/26064 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
4a3956d7cc
commit
dea13331a1
|
@ -34,6 +34,7 @@ EXAMPLE|\
|
||||||
\.jpg$|\
|
\.jpg$|\
|
||||||
\.cksum$|\
|
\.cksum$|\
|
||||||
\.bin$|\
|
\.bin$|\
|
||||||
|
\.vbt$|\
|
||||||
\.hex$|\
|
\.hex$|\
|
||||||
\.patch$|\
|
\.patch$|\
|
||||||
_shipped$|\
|
_shipped$|\
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
LC_ALL=C export LC_ALL
|
LC_ALL=C export LC_ALL
|
||||||
|
|
||||||
EXCLUDED_DIRS='src/vendorcode/\|util/romcc/\|cbfstool/lzma/\|cbfstool/lz4/\|Documentation/\|build/\|3rdparty/\|\.git/\|coreboot-builds/\|util/nvidia/cbootimage/'
|
EXCLUDED_DIRS='src/vendorcode/\|util/romcc/\|cbfstool/lzma/\|cbfstool/lz4/\|Documentation/\|build/\|3rdparty/\|\.git/\|coreboot-builds/\|util/nvidia/cbootimage/'
|
||||||
EXCLUDED_FILES='\.jpg$\|\.cksum$\|\.bin$\|\.hex$\|\.ico$\|\.o$\|\.bz2$\|\.xz$\|^.tmpconfig\|\.pyc$\|_shipped$\|sha256$\|\.png$\|\.patch$'
|
EXCLUDED_FILES='\.jpg$\|\.cksum$\|\.bin$\|\.vbt$\|\.hex$\|\.ico$\|\.o$\|\.bz2$\|\.xz$\|^.tmpconfig\|\.pyc$\|_shipped$\|sha256$\|\.png$\|\.patch$'
|
||||||
|
|
||||||
# Use git ls-files if the code is in a git repo, otherwise use find.
|
# Use git ls-files if the code is in a git repo, otherwise use find.
|
||||||
if [ -n "$(command -v git)" ] && \
|
if [ -n "$(command -v git)" ] && \
|
||||||
|
|
|
@ -15,5 +15,5 @@
|
||||||
# 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
|
||||||
grep -l "[[:space:]][[:space:]]*$" `git ls-files src util |egrep -v "(^3rdparty|^src/vendorcode/|^util/kconfig/|^util/nvidia/cbootimage$|\<COPYING\>|\<LICENSE\>|\<README\>|_shipped$|\.patch$|\.bin$|\.hex$|\.jpg$|\.ttf$|\.woff$|\.png$|\.eot$)"` | \
|
grep -l "[[:space:]][[:space:]]*$" `git ls-files src util |egrep -v "(^3rdparty|^src/vendorcode/|^util/kconfig/|^util/nvidia/cbootimage$|\<COPYING\>|\<LICENSE\>|\<README\>|_shipped$|\.patch$|\.bin$|\.hex$|\.jpg$|\.ttf$|\.woff$|\.png$|\.eot$|\.vbt$)"` | \
|
||||||
sed -e "s,^.*$,File & has lines ending with whitespace.,"
|
sed -e "s,^.*$,File & has lines ending with whitespace.,"
|
||||||
|
|
|
@ -25,6 +25,7 @@ HEADER_EXCLUDED="\
|
||||||
\.jpg$|\
|
\.jpg$|\
|
||||||
\.cksum$|\
|
\.cksum$|\
|
||||||
\.bin$|\
|
\.bin$|\
|
||||||
|
\.vbt$|\
|
||||||
\.hex$|\
|
\.hex$|\
|
||||||
\.patch$|\
|
\.patch$|\
|
||||||
_shipped$|\
|
_shipped$|\
|
||||||
|
|
Loading…
Reference in New Issue