From 5fc8d81a1d33c491b004d8757a8ac30fb5fe214f Mon Sep 17 00:00:00 2001 From: Gaƫtan Gilbert Date: Thu, 23 Nov 2017 14:41:11 +0100 Subject: Linter: do not lint untracked files. --- dev/tools/should-check-whitespace.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'dev') diff --git a/dev/tools/should-check-whitespace.sh b/dev/tools/should-check-whitespace.sh index 190511d95..d85d65107 100755 --- a/dev/tools/should-check-whitespace.sh +++ b/dev/tools/should-check-whitespace.sh @@ -2,4 +2,5 @@ # determine if a file has whitespace checking enabled in .gitattributes +git ls-files --error-unmatch "$1" >/dev/null 2>&1 && git check-attr whitespace -- "$1" | grep -q -v -e 'unset$' -e 'unspecified$' -- cgit v1.2.3