diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2018-06-13 03:17:17 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-01-10 06:21:13 +0100 |
commit | 30e3e21e873b01b98ab91dc1252d4112d6a9fd2a (patch) | |
tree | bfd6b5a83e2edc27014e55b694e9c53803b5cd2e /scripts/libmakepkg/integrity | |
parent | 03d85763e08cbe7c5ef1f9863cf25e026ee2756f (diff) | |
download | pacman-30e3e21e873b01b98ab91dc1252d4112d6a9fd2a.tar.gz pacman-30e3e21e873b01b98ab91dc1252d4112d6a9fd2a.tar.xz |
libmakepkg/lint_pkgbuild: check for invalid variables even if they're empty
Checking the length of the variable to be non-zero before considering it
an error is inconsistent; license=() and depends='' and `declare arch`
should be considered just as wrong.
In fact the current check detects depends='' as non-zero and returns an
error, but happily considers the others to be perfectly okay.
A more reliable check is to simply see if the name has been declared
(whether it is set or not), and then enforce that it's been declared to
the right type.
As an added benefit, avoiding the creation of proxy-evaled variables to
count the number of indexes results in simpler code.
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/libmakepkg/integrity')
0 files changed, 0 insertions, 0 deletions