pacman/scripts/libmakepkg
Eli Schwartz 30e3e21e87 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>
2019-01-10 15:21:13 +10:00
..
buildenv Split prepare_buildenv() to libmakepkg 2018-11-27 22:48:43 +10:00
executable makepkg: fix broken check for the fakeroot binary 2019-01-10 13:25:12 +10:00
integrity Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
lint_config Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
lint_package Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
lint_pkgbuild libmakepkg/lint_pkgbuild: check for invalid variables even if they're empty 2019-01-10 15:21:13 +10:00
source Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
tidy Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
util Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
.gitignore libmakepkg: fix .gitignore to simply ignore all generated .sh files 2017-12-07 15:37:20 +10:00
buildenv.sh.in Split prepare_buildenv() to libmakepkg 2018-11-27 22:48:43 +10:00
executable.sh.in libmakepkg/executable: don't rely on scoped value of $ret to flag outcomes 2018-12-04 17:22:27 +10:00
integrity.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
lint_config.sh.in libmakepkg: Add basic rules to lint makepkg.conf variables 2018-03-15 14:34:13 +10:00
lint_package.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
lint_pkgbuild.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
meson.build meson: remove useless mkdir -p 2018-12-12 10:12:41 +10:00
source.sh.in remove unneeded break argument from option parsing 2018-05-12 21:09:37 +10:00
srcinfo.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
tidy.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00
util.sh.in Update coyrights for 2018 2018-03-14 13:31:31 +10:00