From a4954cdaf62d315e756a8a0abac6f7f95de02423 Mon Sep 17 00:00:00 2001 From: thk123 Date: Thu, 12 Jan 2017 11:00:44 +0000 Subject: [PATCH] Run lint script handling deleted files Previously we would try and run git blame on a deleted file (since would still show up in the diff) which would cause an error. Now we just skip over such files. --- scripts/run_lint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/run_lint.sh b/scripts/run_lint.sh index f2f1a41d811..56398f9b805 100755 --- a/scripts/run_lint.sh +++ b/scripts/run_lint.sh @@ -44,6 +44,12 @@ IFS=$'\n' are_errors=0 for file in $diff_files; do + # If the file has been deleted we don't want to run the linter on it + if ! [[ -e $file ]] + then + continue + fi + # We build another grep filter the output of the linting script lint_grep_filter="^("