Handle hard coded attribute language components

This commit is contained in:
Dennis Eichhorn 2018-07-13 11:54:18 +02:00 committed by GitHub
parent a99882999f
commit 7f8098c3fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,10 +77,10 @@ if [[ "$FILE" =~ ^.+(tpl\.php|html)$ ]]; then
grep -P '(style=)' $FILE >&2
fi
# Value fields should not be hard coded *warning*
if [[ -n $(grep -P '(value=\")((?!\<\?).)*(>)' $FILE) ]]; then
echo -e "\e[1;31m\tValue field should not be hard coded.\e[0m" >&2
grep -P '(value=\")((?!\<\?).)*(>)' $FILE >&2
# Attribute descriptions should not be hard coded *warning*
if [[ -n $(grep -P '(value|title|alt|aria\-label)(=\")((?!\<\?).)*(>)' $FILE) ]]; then
echo -e "\e[1;31m\tAttribute description should not be hard coded.\e[0m" >&2
grep -P '(value|title|alt|aria\-label)(=\")((?!\<\?).)*(>)' $FILE >&2
fi
# Hard coded language *warning*