mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-02-07 07:08:41 +00:00
Fix new hooks
This commit is contained in:
parent
58e229e911
commit
267b006602
|
|
@ -64,8 +64,6 @@ 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
|
||||||
echo 0
|
|
||||||
echo $FILE
|
|
||||||
echo 1
|
echo 1
|
||||||
GEN_SYNTAX=$(hasInvalidBasicSyntax "$FILE")
|
GEN_SYNTAX=$(hasInvalidBasicSyntax "$FILE")
|
||||||
echo 2
|
echo 2
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,9 @@ isValidBashScript() {
|
||||||
}
|
}
|
||||||
|
|
||||||
hasInvalidBasicSyntax() {
|
hasInvalidBasicSyntax() {
|
||||||
|
echo 1
|
||||||
|
echo $1
|
||||||
# Check whitespace end of line in code
|
# Check whitespace end of line in code
|
||||||
echo "$(grep -P ' $' )"
|
|
||||||
echo $(grep -P ' $' "$1")
|
|
||||||
|
|
||||||
if [[ -n $(grep -P ' $' "$1") ]]; then
|
if [[ -n $(grep -P ' $' "$1") ]]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user