Verified Commit e8774725 authored by Morgan Adamiec's avatar Morgan Adamiec
Browse files

makepkg: lint empty arrays

While depend arrays are already linted, many array kinds are
still not. An empty string is never a valid array value so check
all arrays for it.
parent 39c3cbdf
Pipeline #11832 passed with stage
in 2 minutes and 23 seconds
......@@ -28,7 +28,7 @@ source "$LIBRARY/util/"
source "$LIBRARY/util/"
lint_variable() {
local i a pkg out bad ret=0
......@@ -95,3 +95,21 @@ lint_variable() {
return $ret
lint_array() {
local i var ret=0
for i in ${pkgbuild_schema_arrays[@]}; do
local l=()
get_pkgbuild_all_split_attributes $i l
for var in "${l[@]}"; do
if [[ -z $var ]]; then
error "$(gettext "%s does not allow empty values.")" "$i"
return $ret
Supports Markdown
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