[arch-dev-public] [PATCH] Detect more usages of $startdir
The detection of $startdir usage ignored any potential brackets or quotes. Now the following are all detected: $startdir ${startdir} "$startdir" "${startdir}" Signed-off-by: Allan McRae <allan@archlinux.org> --- Namcap/invalidstartdir.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Namcap/invalidstartdir.py b/Namcap/invalidstartdir.py index f323b76..720e5cd 100644 --- a/Namcap/invalidstartdir.py +++ b/Namcap/invalidstartdir.py @@ -29,7 +29,7 @@ class package: def analyze(self, pkginfo, tar): ret = [[], [], []] for i in pkginfo.pkgbuild: - startdirs = re.split('\$startdir', i) + startdirs = re.split('\${?startdir}?"?', i) for j in startdirs[1:]: if j[:4] != '/pkg' and j[:4] != '/src': ret[0].append(("file-referred-in-startdir", ())) -- 1.7.1
On Mon, Jun 14, 2010 at 10:35 PM, Allan McRae <allan@archlinux.org> wrote:
The detection of $startdir usage ignored any potential brackets or quotes. Now the following are all detected: $startdir ${startdir} "$startdir" "${startdir}"
Signed-off-by: Allan McRae <allan@archlinux.org> ---
Looks fine to me; pulled in to my local repo. -Dan
participants (2)
-
Allan McRae
-
Dan McGee