FS#48101 - [namcap] no warning if non-array variables are an array

Attached to Project: Arch Linux
Opened by john (MiS) - Monday, 08 February 2016, 19:59 GMT
Last edited by Eli Schwartz (eschwartz) - Sunday, 18 February 2018, 04:42 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

While building a package from AUR makepkg failed because the
install= variable in the PKGBUILD was an array.

Running namcap against the PKGBUILD gives no warning.

Version: namcap-3.2.6-1

Steps to reproduce:
- make the install= variable in a PKGBUILD an array
- run 'namcap PKGBUILD'

Not sure if it's really necessary and maybe then all variables
that must not be an array should be checked.

Anyways, the attached patch fixes it for install= and url= variables.
This task depends upon

Closed by  Eli Schwartz (eschwartz)
Sunday, 18 February 2018, 04:42 GMT
Reason for closing:  Not a bug
Additional comments about closing:  namcap does not need to warn about packages that literally don't build because makepkg considers them an error
Comment by Dave Reisner (falconindy) - Monday, 08 February 2016, 20:08 GMT
Wouldn't it be better to fix this sort of thing in makepkg itself?
Comment by john (MiS) - Monday, 08 February 2016, 21:19 GMT
I don't know. The makepkg error is: ==> ERROR: install should not be an array
Comment by Dave Reisner (falconindy) - Monday, 08 February 2016, 21:23 GMT
Then why does namcap need patching if makepkg already rejects it?
Comment by john (MiS) - Monday, 08 February 2016, 21:45 GMT
Namcap warns about variables that must be an array but are not an array, but not the other way round.
Both cases are rejected by makepkg.

Loading...