mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-02-13 01:28:40 +00:00
Fix function return check
This commit is contained in:
parent
bd2226e822
commit
1cbd330521
|
|
@ -28,7 +28,7 @@ git diff --cached --name-only | while read FILE; do
|
||||||
# Tests
|
# Tests
|
||||||
if [[ "$FILE" =~ ^.+(php)$ ]] && [[ $(isPhanTestSuccessfull "$FILE") = 0 ]]; then
|
if [[ "$FILE" =~ ^.+(php)$ ]] && [[ $(isPhanTestSuccessfull "$FILE") = 0 ]]; then
|
||||||
echo -e "\e[1;31m\tPhan error.\e[0m" >&2
|
echo -e "\e[1;31m\tPhan error.\e[0m" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$FILE" =~ ^.+(php)$ ]] && [[ $(isPhpStanTestSuccessfull "$FILE") = 0 ]]; then
|
if [[ "$FILE" =~ ^.+(php)$ ]] && [[ $(isPhpStanTestSuccessfull "$FILE") = 0 ]]; then
|
||||||
|
|
@ -38,7 +38,8 @@ git diff --cached --name-only | while read FILE; do
|
||||||
|
|
||||||
# Syntax
|
# Syntax
|
||||||
if [[ "$FILE" =~ ^.+(php)$ ]]; then
|
if [[ "$FILE" =~ ^.+(php)$ ]]; then
|
||||||
PHP_SYNTAX=$(hasInvalidPhpSyntax "$FILE")
|
$(hasInvalidPhpSyntax "$FILE")
|
||||||
|
PHP_SYNTAX=$?
|
||||||
|
|
||||||
if [[ $PHP_SYNTAX = 1 ]]; then
|
if [[ $PHP_SYNTAX = 1 ]]; then
|
||||||
echo -e "\e[1;31m\tPhp linting error.\e[0m" >&2
|
echo -e "\e[1;31m\tPhp linting error.\e[0m" >&2
|
||||||
|
|
@ -62,8 +63,8 @@ git diff --cached --name-only | while read FILE; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$FILE" =~ ^.+(sh|js|php|json|css)$ ]]; then
|
if [[ "$FILE" =~ ^.+(sh|js|php|json|css)$ ]]; then
|
||||||
GEN_SYNTAX=$(hasInvalidBasicSyntax "$FILE")
|
$(hasInvalidBasicSyntax "$FILE")
|
||||||
echo $GEN_SYNTAX
|
GEN_SYNTAX=$?
|
||||||
|
|
||||||
if [[ $GEN_SYNTAX = 1 ]]; then
|
if [[ $GEN_SYNTAX = 1 ]]; then
|
||||||
echo -e "\e[1;31m\tFound whitespace at end of line in $FILE.\e[0m" >&2
|
echo -e "\e[1;31m\tFound whitespace at end of line in $FILE.\e[0m" >&2
|
||||||
|
|
@ -79,7 +80,8 @@ git diff --cached --name-only | while read FILE; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$FILE" =~ ^.+(tpl\.php|html)$ ]]; then
|
if [[ "$FILE" =~ ^.+(tpl\.php|html)$ ]]; then
|
||||||
TPL_SYNTAX=$(hasInvalidHtmlTemplateContent "$FILE")
|
$(hasInvalidHtmlTemplateContent "$FILE")
|
||||||
|
TPL_SYNTAX=$?
|
||||||
|
|
||||||
if [[ $TPL_SYNTAX = 1 ]]; then
|
if [[ $TPL_SYNTAX = 1 ]]; then
|
||||||
echo -e "\e[1;31m\tFound missing image alt attribute.\e[0m" >&2
|
echo -e "\e[1;31m\tFound missing image alt attribute.\e[0m" >&2
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ echo $rootpath
|
||||||
# Tests
|
# Tests
|
||||||
if [[ "$FILE" =~ ^.+(php)$ ]] && [[ $(isPhanTestSuccessfull "$FILE") = 0 ]]; then
|
if [[ "$FILE" =~ ^.+(php)$ ]] && [[ $(isPhanTestSuccessfull "$FILE") = 0 ]]; then
|
||||||
echo -e "\e[1;31m\tPhan error.\e[0m" >&2
|
echo -e "\e[1;31m\tPhan error.\e[0m" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$FILE" =~ ^.+(php)$ ]] && [[ $(isPhpStanTestSuccessfull "$FILE") = 0 ]]; then
|
if [[ "$FILE" =~ ^.+(php)$ ]] && [[ $(isPhpStanTestSuccessfull "$FILE") = 0 ]]; then
|
||||||
|
|
@ -41,7 +41,8 @@ echo $rootpath
|
||||||
|
|
||||||
# Syntax
|
# Syntax
|
||||||
if [[ "$FILE" =~ ^.+(php)$ ]]; then
|
if [[ "$FILE" =~ ^.+(php)$ ]]; then
|
||||||
PHP_SYNTAX=$(hasInvalidPhpSyntax "$FILE")
|
$(hasInvalidPhpSyntax "$FILE")
|
||||||
|
PHP_SYNTAX=$?
|
||||||
|
|
||||||
if [[ $PHP_SYNTAX = 1 ]]; then
|
if [[ $PHP_SYNTAX = 1 ]]; then
|
||||||
echo -e "\e[1;31m\tPhp linting error.\e[0m" >&2
|
echo -e "\e[1;31m\tPhp linting error.\e[0m" >&2
|
||||||
|
|
@ -65,7 +66,8 @@ echo $rootpath
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$FILE" =~ ^.+(sh|js|php|json|css)$ ]]; then
|
if [[ "$FILE" =~ ^.+(sh|js|php|json|css)$ ]]; then
|
||||||
GEN_SYNTAX=$(hasInvalidBasicSyntax "$FILE")
|
$(hasInvalidBasicSyntax "$FILE")
|
||||||
|
GEN_SYNTAX=$?
|
||||||
|
|
||||||
if [[ $GEN_SYNTAX = 1 ]]; then
|
if [[ $GEN_SYNTAX = 1 ]]; then
|
||||||
echo -e "\e[1;31m\tFound whitespace at end of line in $FILE.\e[0m" >&2
|
echo -e "\e[1;31m\tFound whitespace at end of line in $FILE.\e[0m" >&2
|
||||||
|
|
@ -81,7 +83,8 @@ echo $rootpath
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$FILE" =~ ^.+(tpl\.php|html)$ ]]; then
|
if [[ "$FILE" =~ ^.+(tpl\.php|html)$ ]]; then
|
||||||
TPL_SYNTAX=$(hasInvalidHtmlTemplateContent "$FILE")
|
$(hasInvalidHtmlTemplateContent "$FILE")
|
||||||
|
TPL_SYNTAX=$?
|
||||||
|
|
||||||
if [[ $TPL_SYNTAX = 1 ]]; then
|
if [[ $TPL_SYNTAX = 1 ]]; then
|
||||||
echo -e "\e[1;31m\tFound missing image alt attribute.\e[0m" >&2
|
echo -e "\e[1;31m\tFound missing image alt attribute.\e[0m" >&2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user