mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-02-13 17:48:39 +00:00
Improve whitespace check
This commit is contained in:
parent
3bf989aef5
commit
a523c9968f
|
|
@ -68,8 +68,9 @@ fi
|
||||||
|
|
||||||
# Check whitespace end of line in code
|
# Check whitespace end of line in code
|
||||||
if [[ "$FILE" =~ ^.+(sh|js|php|json)$ ]]; then
|
if [[ "$FILE" =~ ^.+(sh|js|php|json)$ ]]; then
|
||||||
if [[ -n $(find $FILE -type f -exec egrep -l " +$" {} \;) ]]; then
|
if [[ -n $(grep -E ' $' $FILE) ]]; then
|
||||||
echo -e "\e[1;31m\tFound whitespace at end of line.\e[0m" >&2
|
echo -e "\e[1;31m\tFound whitespace at end of line.\e[0m" >&2
|
||||||
|
echo grep -E ' $' $FILE >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user