Fix variable declaration

This commit is contained in:
Dennis Eichhorn 2018-08-11 12:14:14 +02:00
parent 180ec55f29
commit cbf30514ba
2 changed files with 1 additions and 2 deletions

View File

@ -71,8 +71,6 @@ isValidBashScript() {
}
hasInvalidBasicSyntax() {
echo 3
echo $1
# Check whitespace end of line in code
if [[ -n $(grep -P ' $' "$1") ]]; then
return 1

View File

@ -66,6 +66,7 @@ echo $rootpath
if [[ "$FILE" =~ ^.+(sh|js|php|json|css)$ ]]; then
GEN_SYNTAX=$(hasInvalidBasicSyntax "$FILE")
echo GEN_SYNTAX
if [[ $GEN_SYNTAX = 1 ]]; then
echo -e "\e[1;31m\tFound whitespace at end of line in $FILE.\e[0m" >&2