support/scripts/pkg-stats: add list of status checks to the json output
authorHeiko Thiery <heiko.thiery@gmail.com>
Sat, 7 Mar 2020 07:56:32 +0000 (08:56 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 7 Mar 2020 20:38:26 +0000 (21:38 +0100)
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
support/scripts/pkg-stats

index 59b6f388bd888b423c09808788d67eb7263aa226..c0e2fbf4139eb8a9b081bd761bdda35a5b3524be 100755 (executable)
@@ -88,6 +88,11 @@ class Package:
     all_license_files = list()
     all_versions = dict()
     all_ignored_cves = dict()
+    # This is the list of all possible checks. Add new checks to this list so
+    # a tool that post-processeds the json output knows the checks before
+    # iterating over the packages.
+    status_checks = ['cve', 'developers', 'hash', 'license',
+                     'license-files', 'patches', 'pkg-check', 'url', 'version']
 
     def __init__(self, name, path):
         self.name = name
@@ -972,6 +977,7 @@ def dump_json(packages, defconfigs, stats, date, commit, output):
     final = {'packages': pkgs,
              'stats': statistics,
              'defconfigs': defconfigs,
+             'package_status_checks': Package.status_checks,
              'commit': commit,
              'date': str(date)}