From de8d17b107d27656c0c6b791eeddcff14f860dec Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 26 Oct 2017 11:02:46 +0200 Subject: [PATCH] Already in hooks --- Helper/pre_commit.sh | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 Helper/pre_commit.sh diff --git a/Helper/pre_commit.sh b/Helper/pre_commit.sh deleted file mode 100644 index b984d52..0000000 --- a/Helper/pre_commit.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -git diff --cached --name-only | while read FILE; do -if [[ "$FILE" =~ ^.+(php)$ ]]; then - if [[ -f ${FILE} ]]; then - php -l "$FILE" 1> /dev/null - if [ $? -ne 0 ]; then - echo -e "\e[1;31m\tAborting commit due to files with syntax errors.\e[0m" >&2 - exit 1 - fi - fi -fi -done || exit $?