From 671c0bc06f3fcccd2ef8294bab8ce79fa3382810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Tue, 26 Jul 2016 00:51:10 +0200 Subject: [PATCH] Tools: Don't run lint on deleted files Generates a harmless "No such file or directory" otherwise when a file is removed in a commit. --- Tools/lint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/lint.sh b/Tools/lint.sh index c1feb41fe3..6802e7abb5 100755 --- a/Tools/lint.sh +++ b/Tools/lint.sh @@ -5,7 +5,7 @@ fail=0 # Check for clang-format issues. -for f in $(git status --porcelain | awk '{print $2}'); do +for f in $(git diff --name-only --diff-filter=ACMRTUXB | awk '{print $2}'); do if ! echo "${f}" | egrep -q "[.](cpp|h|mm)$"; then continue fi