summaryrefslogtreecommitdiff
path: root/util/lint
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2018-05-30 15:54:08 +0200
committerPatrick Georgi <pgeorgi@google.com>2018-05-30 17:12:00 +0000
commit54867864958262a57c60267df51c717a5bb8cc1d (patch)
treeb60ccafc270a7a0b52c5fc4b3e8040d89eabcc38 /util/lint
parent9110c1766866da698d20dc5d1e4ce87d098e2812 (diff)
downloadcoreboot-54867864958262a57c60267df51c717a5bb8cc1d.tar.xz
checkpatch: exclude util/crossgcc/patches
These files are supposed to contain trailing whitespace due to the patch format. Also use the exclusion list in the pre-commit hook. Change-Id: I8816c05ea703964a332915a0675096836957b242 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/26695 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Martin Roth <martinroth@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/lint')
-rwxr-xr-xutil/lint/lint-007-checkpatch10
1 files changed, 9 insertions, 1 deletions
diff --git a/util/lint/lint-007-checkpatch b/util/lint/lint-007-checkpatch
index 2e451cb77d..34b933164c 100755
--- a/util/lint/lint-007-checkpatch
+++ b/util/lint/lint-007-checkpatch
@@ -21,13 +21,21 @@ INCLUDED_FILES='.*\.[ch]\|Kconfig.*$'
EXCLUDED_DIRS="^payloads/libpayload/util/kconfig\|\
^payloads/libpayload/curses/PDCurses\|\
+^util/crossgcc/patches\|\
^util/kconfig\|\
^src/vendorcode\|\
^Documentation"
-# Space separated list of directories to test
+# default: test src and util
if [ "$1" = "" ]; then
INCLUDED_DIRS="src util"
+# special mode: take diff from stdin, but exclude the dirs
+elif [ "$1" = "diff" ]; then
+ args=$( echo $EXCLUDED_DIRS | \
+ sed -e 's,\\|, ,g' -e 's,\^,--exclude=,g' )
+ util/lint/checkpatch.pl --quiet --no-signoff $args -
+ exit $?
+# Space separated list of directories to test
else
INCLUDED_DIRS="$1"
fi