licensepkg: errors are not correctly reported
There are several self.errors.append
codes in Namcap/rules/licensepkg.py
. They should use a tuple for arguments
$ namcap /var/cache/pacman/pkg/buildbot-3.10.0-2-any.pkg.tar.zst
buildbot W: Directory (usr/lib/python3.11/site-packages/buildbot/reporters/templates) is empty
buildbot E: GPL2 is not a valid SPDX license identifier. See https://spdx.org/licenses/ for valid identifiers, or prefix the identifier with 'LicenseRef-', if it is custom.
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/lib/python3.11/site-packages/namcap.py", line 253, in <module>
process_realpackage(package, active_modules)
File "/usr/lib/python3.11/site-packages/namcap.py", line 100, in process_realpackage
show_messages(pkginfo["name"], "E", rule.errors)
File "/usr/lib/python3.11/site-packages/namcap.py", line 72, in show_messages
print("%s %s: %s" % (name, colored_key[key], Namcap.tags.format_message(msg)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/Namcap/tags.py", line 37, in format_message
tag, data = msg
^^^^^^^^^
ValueError: too many values to unpack (expected 2)