aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorMaxime Dénès2017-11-27 16:44:16 +0100
committerMaxime Dénès2017-11-27 16:44:16 +0100
commit4774a3129f4175b0b97d538a1c61eb084332fd85 (patch)
tree3f4d9b43c5ced9680824a7528eeb885663454833 /dev
parentc1e670b386f83ed78104a6eb6e4d17cc1d906439 (diff)
parent5fc8d81a1d33c491b004d8757a8ac30fb5fe214f (diff)
Merge PR #6227: Linter: do not lint untracked files.
Diffstat (limited to 'dev')
-rwxr-xr-xdev/tools/should-check-whitespace.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/dev/tools/should-check-whitespace.sh b/dev/tools/should-check-whitespace.sh
index 190511d957..d85d651070 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$'