Commit a5d29d51 authored by Leo's avatar Leo

add variable-capitalized

parent cb8f9be3
......@@ -237,6 +237,12 @@ double_underscore_in_variable() {
scan '(^|\t)?__[A-Za-z0-9_].*=' 'double underscore on variables are reserved' 'AL30' 'MC'
scan '(^|\t)local ([A-Za-z0-9_])?.*__[A-Za-z0-9_].*(=)?' 'double underscore on variables are reserved' 'AL30' 'MC'
}
variable_capitalized() {
[ "$SKIP_VARIABLE_CAPITALIZED" ] && return 0
[ "$SKIP_AL31" ] && return 0
scan '^[a-z0-9_]*[A-Z].*=' 'variables must not have capital letters' 'AL31' 'MC'
scan '(\t)?local [a-z0-9_ ]*[A-Z].*(=)?' 'variables must not have capital letters' 'AL31' 'MC'
}
_run_apkbuild_leo() {
......@@ -275,6 +281,7 @@ for apkbuild; do
literal_integer_is_quoted &
pkgname_used_in_source &
double_underscore_in_variable &
variable_capitalized &
# Don't perform these checks on packages from main
if ! [ -z "${apkbuild##*main/*}" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment