From 56863c3d0eccfb0d065e3c51f8f41e5801be3d3e Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Wed, 8 Jul 2015 14:43:21 +0000 Subject: [PATCH] Ensure bin/lint doesn't complain about removed files when used as a git precommit script. --- bin/lint | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/lint b/bin/lint index 4e50906c..32e791fb 100755 --- a/bin/lint +++ b/bin/lint @@ -56,6 +56,11 @@ function lint { return fi + # Don't lint files that don't exist + if ! [ -a "${filename}" ]; then + return + fi + case "$ext" in go) lint_go "${filename}" ;;