From 2a566e1c9047ad5ecad383038b378d4b31e63e33 Mon Sep 17 00:00:00 2001
From: Robert Lange <robert.lange@uni-leipzig.de>
Date: Mon, 3 Jan 2022 16:21:34 +0100
Subject: [PATCH] refs #21064 [finc] codestyle check: install dependencies for
 codesniffer (difffilter) and php-cs-fixer

---
 install-codestylechecker.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/install-codestylechecker.sh b/install-codestylechecker.sh
index 02c158a41de..85003b50dd1 100755
--- a/install-codestylechecker.sh
+++ b/install-codestylechecker.sh
@@ -4,7 +4,7 @@ red="\e[0;91m"
 green="\e[0;92m"
 clean="\e[0m"
 
-if [ -z $1 ] 
+if [ -z $1 ]
 then
     echo -e "\n${red}Nicht genau angegeben was ich tun soll.${clean}\n"
     echo -e "---------------------------------------------------------------------------"
@@ -15,7 +15,7 @@ then
     exit 1
 fi
 
-if [ $(which curl) != "/usr/bin/curl" ] 
+if [ $(which curl) != "/usr/bin/curl" ]
 then
 	echo -e "\n${red}Benötigt curl.\n"
 	exit 1
@@ -38,8 +38,12 @@ then
 
     curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
     curl -OL https://alpha.finc.info/vufind2/logs/alpha/CodeSniffer.conf
+    curl -OL https://alpha.finc.info/vufind2/logs/alpha/diffFilter.phar
+    curl -OL https://alpha.finc.info/vufind2/logs/alpha/php-cs-fixer3
 
     chmod +x $HOME/bin/codestylechecker/phpcs.phar
+    chmod +x $HOME/bin/codestylechecker/diffFilter.phar
+    chmod +x $HOME/bin/codestylechecker/php-cs-fixer3
 
     echo -e "\n${green}Kopiere Hooks nach ${gitdir}/.git/hooks\n${clean}"
 
@@ -55,6 +59,7 @@ then
     chmod +x $gitdir/.git/hooks/pre-push
 
     echo -e "\n${green}Ready${clean}\n"
+    echo -e "\n${green}Activate PHP CS Fixer in PHPSorm: https://projekte.ub.uni-leipzig.de/projects/finc-intern/wiki/Code-Quality-Checking_mit_PHPStorm${clean}\n"
     exit 0
 
     elif [ $1 = "update" ]
-- 
GitLab