chiark / gitweb /
handle gradle-plugin 3.0 output apk location
[fdroidserver.git] / fdroidserver / lint.py
1 #!/usr/bin/env python3
2 #
3 # lint.py - part of the FDroid server tool
4 # Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See th
14 # GNU Affero General Public License for more details.
15 #
16 # You should have received a copy of the GNU Affero General Public Licen
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19 from argparse import ArgumentParser
20 import glob
21 import os
22 import re
23 import sys
24
25 from . import common
26 from . import metadata
27 from . import rewritemeta
28
29 config = None
30 options = None
31
32
33 def enforce_https(domain):
34     return (re.compile(r'.*[^sS]://[^/]*' + re.escape(domain) + r'(/.*)?'),
35             domain + " URLs should always use https://")
36
37
38 https_enforcings = [
39     enforce_https('github.com'),
40     enforce_https('gitlab.com'),
41     enforce_https('bitbucket.org'),
42     enforce_https('apache.org'),
43     enforce_https('google.com'),
44     enforce_https('svn.code.sf.net'),
45 ]
46
47
48 def forbid_shortener(domain):
49     return (re.compile(r'https?://[^/]*' + re.escape(domain) + r'/.*'),
50             "URL shorteners should not be used")
51
52
53 http_url_shorteners = [
54     forbid_shortener('goo.gl'),
55     forbid_shortener('t.co'),
56     forbid_shortener('ur1.ca'),
57     forbid_shortener('is.gd'),
58     forbid_shortener('bit.ly'),
59     forbid_shortener('tiny.cc'),
60     forbid_shortener('tinyurl.com'),
61 ]
62
63 http_checks = https_enforcings + http_url_shorteners + [
64     (re.compile(r'.*github\.com/[^/]+/[^/]+\.git'),
65      "Appending .git is not necessary"),
66     (re.compile(r'.*://[^/]*(github|gitlab|bitbucket|rawgit)[^/]*/([^/]+/){1,3}master'),
67      "Use /HEAD instead of /master to point at a file in the default branch"),
68 ]
69
70 regex_checks = {
71     'WebSite': http_checks,
72     'SourceCode': http_checks,
73     'Repo': https_enforcings,
74     'IssueTracker': http_checks + [
75         (re.compile(r'.*github\.com/[^/]+/[^/]+/*$'),
76          "/issues is missing"),
77         (re.compile(r'.*gitlab\.com/[^/]+/[^/]+/*$'),
78          "/issues is missing"),
79     ],
80     'Donate': http_checks + [
81         (re.compile(r'.*flattr\.com'),
82          "Flattr donation methods belong in the FlattrID flag"),
83     ],
84     'Changelog': http_checks,
85     'Author Name': [
86         (re.compile(r'^\s'),
87          "Unnecessary leading space"),
88         (re.compile(r'.*\s$'),
89          "Unnecessary trailing space"),
90     ],
91     'Summary': [
92         (re.compile(r'.*\b(free software|open source)\b.*', re.IGNORECASE),
93          "No need to specify that the app is Free Software"),
94         (re.compile(r'.*((your|for).*android|android.*(app|device|client|port|version))', re.IGNORECASE),
95          "No need to specify that the app is for Android"),
96         (re.compile(r'.*[a-z0-9][.!?]( |$)'),
97          "Punctuation should be avoided"),
98         (re.compile(r'^\s'),
99          "Unnecessary leading space"),
100         (re.compile(r'.*\s$'),
101          "Unnecessary trailing space"),
102     ],
103     'Description': [
104         (re.compile(r'\s*[*#][^ .]'),
105          "Invalid bulleted list"),
106         (re.compile(r'^\s'),
107          "Unnecessary leading space"),
108         (re.compile(r'.*\s$'),
109          "Unnecessary trailing space"),
110         (re.compile(r'.*([^[]|^)\[[^:[\]]+( |\]|$)'),
111          "Invalid link - use [http://foo.bar Link title] or [http://foo.bar]"),
112         (re.compile(r'(^|.* )https?://[^ ]+'),
113          "Unlinkified link - use [http://foo.bar Link title] or [http://foo.bar]"),
114     ],
115 }
116
117 locale_pattern = re.compile(r'^[a-z]{2,3}(-[A-Z][A-Z])?$')
118
119
120 def check_regexes(app):
121     for f, checks in regex_checks.items():
122         for m, r in checks:
123             v = app.get(f)
124             t = metadata.fieldtype(f)
125             if t == metadata.TYPE_MULTILINE:
126                 for l in v.splitlines():
127                     if m.match(l):
128                         yield "%s at line '%s': %s" % (f, l, r)
129             else:
130                 if v is None:
131                     continue
132                 if m.match(v):
133                     yield "%s '%s': %s" % (f, v, r)
134
135
136 def get_lastbuild(builds):
137     lowest_vercode = -1
138     lastbuild = None
139     for build in builds:
140         if not build.disable:
141             vercode = int(build.versionCode)
142             if lowest_vercode == -1 or vercode < lowest_vercode:
143                 lowest_vercode = vercode
144         if not lastbuild or int(build.versionCode) > int(lastbuild.versionCode):
145             lastbuild = build
146     return lastbuild
147
148
149 def check_ucm_tags(app):
150     lastbuild = get_lastbuild(app.builds)
151     if (lastbuild is not None
152             and lastbuild.commit
153             and app.UpdateCheckMode == 'RepoManifest'
154             and not lastbuild.commit.startswith('unknown')
155             and lastbuild.versionCode == app.CurrentVersionCode
156             and not lastbuild.forcevercode
157             and any(s in lastbuild.commit for s in '.,_-/')):
158         yield "Last used commit '%s' looks like a tag, but Update Check Mode is '%s'" % (
159             lastbuild.commit, app.UpdateCheckMode)
160
161
162 def check_char_limits(app):
163     limits = config['char_limits']
164
165     if len(app.Summary) > limits['summary']:
166         yield "Summary of length %s is over the %i char limit" % (
167             len(app.Summary), limits['summary'])
168
169     if len(app.Description) > limits['description']:
170         yield "Description of length %s is over the %i char limit" % (
171             len(app.Description), limits['description'])
172
173
174 def check_old_links(app):
175     usual_sites = [
176         'github.com',
177         'gitlab.com',
178         'bitbucket.org',
179     ]
180     old_sites = [
181         'gitorious.org',
182         'code.google.com',
183     ]
184     if any(s in app.Repo for s in usual_sites):
185         for f in ['WebSite', 'SourceCode', 'IssueTracker', 'Changelog']:
186             v = app.get(f)
187             if any(s in v for s in old_sites):
188                 yield "App is in '%s' but has a link to '%s'" % (app.Repo, v)
189
190
191 def check_useless_fields(app):
192     if app.UpdateCheckName == app.id:
193         yield "Update Check Name is set to the known app id - it can be removed"
194
195
196 filling_ucms = re.compile(r'^(Tags.*|RepoManifest.*)')
197
198
199 def check_checkupdates_ran(app):
200     if filling_ucms.match(app.UpdateCheckMode):
201         if not app.AutoName and not app.CurrentVersion and app.CurrentVersionCode == '0':
202             yield "UCM is set but it looks like checkupdates hasn't been run yet"
203
204
205 def check_empty_fields(app):
206     if not app.Categories:
207         yield "Categories are not set"
208
209
210 all_categories = set([
211     "Connectivity",
212     "Development",
213     "Games",
214     "Graphics",
215     "Internet",
216     "Money",
217     "Multimedia",
218     "Navigation",
219     "Phone & SMS",
220     "Reading",
221     "Science & Education",
222     "Security",
223     "Sports & Health",
224     "System",
225     "Theming",
226     "Time",
227     "Writing",
228 ])
229
230
231 def check_categories(app):
232     for categ in app.Categories:
233         if categ not in all_categories:
234             yield "Category '%s' is not valid" % categ
235
236
237 def check_duplicates(app):
238     if app.Name and app.Name == app.AutoName:
239         yield "Name '%s' is just the auto name - remove it" % app.Name
240
241     links_seen = set()
242     for f in ['Source Code', 'Web Site', 'Issue Tracker', 'Changelog']:
243         v = app.get(f)
244         if not v:
245             continue
246         v = v.lower()
247         if v in links_seen:
248             yield "Duplicate link in '%s': %s" % (f, v)
249         else:
250             links_seen.add(v)
251
252     name = app.Name or app.AutoName
253     if app.Summary and name:
254         if app.Summary.lower() == name.lower():
255             yield "Summary '%s' is just the app's name" % app.Summary
256
257     if app.Summary and app.Description and len(app.Description) == 1:
258         if app.Summary.lower() == app.Description[0].lower():
259             yield "Description '%s' is just the app's summary" % app.Summary
260
261     seenlines = set()
262     for l in app.Description.splitlines():
263         if len(l) < 1:
264             continue
265         if l in seenlines:
266             yield "Description has a duplicate line"
267         seenlines.add(l)
268
269
270 desc_url = re.compile(r'(^|[^[])\[([^ ]+)( |\]|$)')
271
272
273 def check_mediawiki_links(app):
274     wholedesc = ' '.join(app.Description)
275     for um in desc_url.finditer(wholedesc):
276         url = um.group(1)
277         for m, r in http_checks:
278             if m.match(url):
279                 yield "URL '%s' in Description: %s" % (url, r)
280
281
282 def check_bulleted_lists(app):
283     validchars = ['*', '#']
284     lchar = ''
285     lcount = 0
286     for l in app.Description.splitlines():
287         if len(l) < 1:
288             lcount = 0
289             continue
290
291         if l[0] == lchar and l[1] == ' ':
292             lcount += 1
293             if lcount > 2 and lchar not in validchars:
294                 yield "Description has a list (%s) but it isn't bulleted (*) nor numbered (#)" % lchar
295                 break
296         else:
297             lchar = l[0]
298             lcount = 1
299
300
301 def check_builds(app):
302     supported_flags = set(metadata.build_flags)
303     # needed for YAML and JSON
304     for build in app.builds:
305         if build.disable:
306             if build.disable.startswith('Generated by import.py'):
307                 yield "Build generated by `fdroid import` - remove disable line once ready"
308             continue
309         for s in ['master', 'origin', 'HEAD', 'default', 'trunk']:
310             if build.commit and build.commit.startswith(s):
311                 yield "Branch '%s' used as commit in build '%s'" % (s, build.versionName)
312             for srclib in build.srclibs:
313                 ref = srclib.split('@')[1].split('/')[0]
314                 if ref.startswith(s):
315                     yield "Branch '%s' used as commit in srclib '%s'" % (s, srclib)
316         for key in build.keys():
317             if key not in supported_flags:
318                 yield key + ' is not an accepted build field'
319
320
321 def check_files_dir(app):
322     dir_path = os.path.join('metadata', app.id)
323     if not os.path.isdir(dir_path):
324         return
325     files = set()
326     for name in os.listdir(dir_path):
327         path = os.path.join(dir_path, name)
328         if not (os.path.isfile(path) or name == 'signatures' or locale_pattern.match(name)):
329             yield "Found non-file at %s" % path
330             continue
331         files.add(name)
332
333     used = {'signatures', }
334     for build in app.builds:
335         for fname in build.patch:
336             if fname not in files:
337                 yield "Unknown file %s in build '%s'" % (fname, build.versionName)
338             else:
339                 used.add(fname)
340
341     for name in files.difference(used):
342         if locale_pattern.match(name):
343             continue
344         yield "Unused file at %s" % os.path.join(dir_path, name)
345
346
347 def check_format(app):
348     if options.format and not rewritemeta.proper_format(app):
349         yield "Run rewritemeta to fix formatting"
350
351
352 def check_license_tag(app):
353     '''Ensure all license tags are in https://spdx.org/license-list'''
354     if app.License.rstrip('+') not in SPDX:
355         yield 'Invalid license tag "%s"! Use only tags from https://spdx.org/license-list' \
356             % (app.License)
357
358
359 def check_extlib_dir(apps):
360     dir_path = os.path.join('build', 'extlib')
361     files = set()
362     for root, dirs, names in os.walk(dir_path):
363         for name in names:
364             files.add(os.path.join(root, name)[len(dir_path) + 1:])
365
366     used = set()
367     for app in apps:
368         for build in app.builds:
369             for path in build.extlibs:
370                 if path not in files:
371                     yield "%s: Unknown extlib %s in build '%s'" % (app.id, path, build.versionName)
372                 else:
373                     used.add(path)
374
375     for path in files.difference(used):
376         if any(path.endswith(s) for s in [
377                 '.gitignore',
378                 'source.txt', 'origin.txt', 'md5.txt',
379                 'LICENSE', 'LICENSE.txt',
380                 'COPYING', 'COPYING.txt',
381                 'NOTICE', 'NOTICE.txt',
382                 ]):
383             continue
384         yield "Unused extlib at %s" % os.path.join(dir_path, path)
385
386
387 def check_for_unsupported_metadata_files(basedir=""):
388     """Checks whether any non-metadata files are in metadata/"""
389
390     global config
391
392     return_value = False
393     formats = config['accepted_formats']
394     for f in glob.glob(basedir + 'metadata/*') + glob.glob(basedir + 'metadata/.*'):
395         if os.path.isdir(f):
396             exists = False
397             for t in formats:
398                 exists = exists or os.path.exists(f + '.' + t)
399             if not exists:
400                 print('"' + f + '/" has no matching metadata file!')
401                 return_value = True
402         elif not os.path.splitext(f)[1][1:] in formats:
403             print('"' + f.replace(basedir, '')
404                   + '" is not a supported file format: (' + ','.join(formats) + ')')
405             return_value = True
406
407     return return_value
408
409
410 def main():
411
412     global config, options
413
414     # Parse command line...
415     parser = ArgumentParser(usage="%(prog)s [options] [APPID [APPID ...]]")
416     common.setup_global_opts(parser)
417     parser.add_argument("-f", "--format", action="store_true", default=False,
418                         help="Also warn about formatting issues, like rewritemeta -l")
419     parser.add_argument("appid", nargs='*', help="app-id in the form APPID")
420     metadata.add_metadata_arguments(parser)
421     options = parser.parse_args()
422     metadata.warnings_action = options.W
423
424     config = common.read_config(options)
425
426     # Get all apps...
427     allapps = metadata.read_metadata(xref=True)
428     apps = common.read_app_args(options.appid, allapps, False)
429
430     anywarns = check_for_unsupported_metadata_files()
431
432     apps_check_funcs = []
433     if len(options.appid) == 0:
434         # otherwise it finds tons of unused extlibs
435         apps_check_funcs.append(check_extlib_dir)
436     for check_func in apps_check_funcs:
437         for warn in check_func(apps.values()):
438             anywarns = True
439             print(warn)
440
441     for appid, app in apps.items():
442         if app.Disabled:
443             continue
444
445         app_check_funcs = [
446             check_regexes,
447             check_ucm_tags,
448             check_char_limits,
449             check_old_links,
450             check_checkupdates_ran,
451             check_useless_fields,
452             check_empty_fields,
453             check_categories,
454             check_duplicates,
455             check_mediawiki_links,
456             check_bulleted_lists,
457             check_builds,
458             check_files_dir,
459             check_format,
460             check_license_tag,
461         ]
462
463         for check_func in app_check_funcs:
464             for warn in check_func(app):
465                 anywarns = True
466                 print("%s: %s" % (appid, warn))
467
468     if anywarns:
469         sys.exit(1)
470
471
472 # A compiled, public domain list of official SPDX license tags from:
473 # https://github.com/sindresorhus/spdx-license-list/blob/v3.0.1/spdx-simple.json
474 # The deprecated license tags have been removed from the list, they are at the
475 # bottom, starting after the last license tags that start with Z.
476 # This is at the bottom, since its a long list of data
477 SPDX = [
478     "PublicDomain",  # an F-Droid addition, until we can enforce a better option
479     "Glide",
480     "Abstyles",
481     "AFL-1.1",
482     "AFL-1.2",
483     "AFL-2.0",
484     "AFL-2.1",
485     "AFL-3.0",
486     "AMPAS",
487     "APL-1.0",
488     "Adobe-Glyph",
489     "APAFML",
490     "Adobe-2006",
491     "AGPL-1.0",
492     "Afmparse",
493     "Aladdin",
494     "ADSL",
495     "AMDPLPA",
496     "ANTLR-PD",
497     "Apache-1.0",
498     "Apache-1.1",
499     "Apache-2.0",
500     "AML",
501     "APSL-1.0",
502     "APSL-1.1",
503     "APSL-1.2",
504     "APSL-2.0",
505     "Artistic-1.0",
506     "Artistic-1.0-Perl",
507     "Artistic-1.0-cl8",
508     "Artistic-2.0",
509     "AAL",
510     "Bahyph",
511     "Barr",
512     "Beerware",
513     "BitTorrent-1.0",
514     "BitTorrent-1.1",
515     "BSL-1.0",
516     "Borceux",
517     "BSD-2-Clause",
518     "BSD-2-Clause-FreeBSD",
519     "BSD-2-Clause-NetBSD",
520     "BSD-3-Clause",
521     "BSD-3-Clause-Clear",
522     "BSD-3-Clause-No-Nuclear-License",
523     "BSD-3-Clause-No-Nuclear-License-2014",
524     "BSD-3-Clause-No-Nuclear-Warranty",
525     "BSD-4-Clause",
526     "BSD-Protection",
527     "BSD-Source-Code",
528     "BSD-3-Clause-Attribution",
529     "0BSD",
530     "BSD-4-Clause-UC",
531     "bzip2-1.0.5",
532     "bzip2-1.0.6",
533     "Caldera",
534     "CECILL-1.0",
535     "CECILL-1.1",
536     "CECILL-2.0",
537     "CECILL-2.1",
538     "CECILL-B",
539     "CECILL-C",
540     "ClArtistic",
541     "MIT-CMU",
542     "CNRI-Jython",
543     "CNRI-Python",
544     "CNRI-Python-GPL-Compatible",
545     "CPOL-1.02",
546     "CDDL-1.0",
547     "CDDL-1.1",
548     "CPAL-1.0",
549     "CPL-1.0",
550     "CATOSL-1.1",
551     "Condor-1.1",
552     "CC-BY-1.0",
553     "CC-BY-2.0",
554     "CC-BY-2.5",
555     "CC-BY-3.0",
556     "CC-BY-4.0",
557     "CC-BY-ND-1.0",
558     "CC-BY-ND-2.0",
559     "CC-BY-ND-2.5",
560     "CC-BY-ND-3.0",
561     "CC-BY-ND-4.0",
562     "CC-BY-NC-1.0",
563     "CC-BY-NC-2.0",
564     "CC-BY-NC-2.5",
565     "CC-BY-NC-3.0",
566     "CC-BY-NC-4.0",
567     "CC-BY-NC-ND-1.0",
568     "CC-BY-NC-ND-2.0",
569     "CC-BY-NC-ND-2.5",
570     "CC-BY-NC-ND-3.0",
571     "CC-BY-NC-ND-4.0",
572     "CC-BY-NC-SA-1.0",
573     "CC-BY-NC-SA-2.0",
574     "CC-BY-NC-SA-2.5",
575     "CC-BY-NC-SA-3.0",
576     "CC-BY-NC-SA-4.0",
577     "CC-BY-SA-1.0",
578     "CC-BY-SA-2.0",
579     "CC-BY-SA-2.5",
580     "CC-BY-SA-3.0",
581     "CC-BY-SA-4.0",
582     "CC0-1.0",
583     "Crossword",
584     "CrystalStacker",
585     "CUA-OPL-1.0",
586     "Cube",
587     "curl",
588     "D-FSL-1.0",
589     "diffmark",
590     "WTFPL",
591     "DOC",
592     "Dotseqn",
593     "DSDP",
594     "dvipdfm",
595     "EPL-1.0",
596     "ECL-1.0",
597     "ECL-2.0",
598     "eGenix",
599     "EFL-1.0",
600     "EFL-2.0",
601     "MIT-advertising",
602     "MIT-enna",
603     "Entessa",
604     "ErlPL-1.1",
605     "EUDatagrid",
606     "EUPL-1.0",
607     "EUPL-1.1",
608     "Eurosym",
609     "Fair",
610     "MIT-feh",
611     "Frameworx-1.0",
612     "FreeImage",
613     "FTL",
614     "FSFAP",
615     "FSFUL",
616     "FSFULLR",
617     "Giftware",
618     "GL2PS",
619     "Glulxe",
620     "AGPL-3.0",
621     "GFDL-1.1",
622     "GFDL-1.2",
623     "GFDL-1.3",
624     "GPL-1.0",
625     "GPL-2.0",
626     "GPL-3.0",
627     "LGPL-2.1",
628     "LGPL-3.0",
629     "LGPL-2.0",
630     "gnuplot",
631     "gSOAP-1.3b",
632     "HaskellReport",
633     "HPND",
634     "IBM-pibs",
635     "IPL-1.0",
636     "ICU",
637     "ImageMagick",
638     "iMatix",
639     "Imlib2",
640     "IJG",
641     "Info-ZIP",
642     "Intel-ACPI",
643     "Intel",
644     "Interbase-1.0",
645     "IPA",
646     "ISC",
647     "JasPer-2.0",
648     "JSON",
649     "LPPL-1.0",
650     "LPPL-1.1",
651     "LPPL-1.2",
652     "LPPL-1.3a",
653     "LPPL-1.3c",
654     "Latex2e",
655     "BSD-3-Clause-LBNL",
656     "Leptonica",
657     "LGPLLR",
658     "Libpng",
659     "libtiff",
660     "LAL-1.2",
661     "LAL-1.3",
662     "LiLiQ-P-1.1",
663     "LiLiQ-Rplus-1.1",
664     "LiLiQ-R-1.1",
665     "LPL-1.02",
666     "LPL-1.0",
667     "MakeIndex",
668     "MTLL",
669     "MS-PL",
670     "MS-RL",
671     "MirOS",
672     "MITNFA",
673     "MIT",
674     "Motosoto",
675     "MPL-1.0",
676     "MPL-1.1",
677     "MPL-2.0",
678     "MPL-2.0-no-copyleft-exception",
679     "mpich2",
680     "Multics",
681     "Mup",
682     "NASA-1.3",
683     "Naumen",
684     "NBPL-1.0",
685     "Net-SNMP",
686     "NetCDF",
687     "NGPL",
688     "NOSL",
689     "NPL-1.0",
690     "NPL-1.1",
691     "Newsletr",
692     "NLPL",
693     "Nokia",
694     "NPOSL-3.0",
695     "NLOD-1.0",
696     "Noweb",
697     "NRL",
698     "NTP",
699     "Nunit",
700     "OCLC-2.0",
701     "ODbL-1.0",
702     "PDDL-1.0",
703     "OCCT-PL",
704     "OGTSL",
705     "OLDAP-2.2.2",
706     "OLDAP-1.1",
707     "OLDAP-1.2",
708     "OLDAP-1.3",
709     "OLDAP-1.4",
710     "OLDAP-2.0",
711     "OLDAP-2.0.1",
712     "OLDAP-2.1",
713     "OLDAP-2.2",
714     "OLDAP-2.2.1",
715     "OLDAP-2.3",
716     "OLDAP-2.4",
717     "OLDAP-2.5",
718     "OLDAP-2.6",
719     "OLDAP-2.7",
720     "OLDAP-2.8",
721     "OML",
722     "OPL-1.0",
723     "OSL-1.0",
724     "OSL-1.1",
725     "OSL-2.0",
726     "OSL-2.1",
727     "OSL-3.0",
728     "OpenSSL",
729     "OSET-PL-2.1",
730     "PHP-3.0",
731     "PHP-3.01",
732     "Plexus",
733     "PostgreSQL",
734     "psfrag",
735     "psutils",
736     "Python-2.0",
737     "QPL-1.0",
738     "Qhull",
739     "Rdisc",
740     "RPSL-1.0",
741     "RPL-1.1",
742     "RPL-1.5",
743     "RHeCos-1.1",
744     "RSCPL",
745     "RSA-MD",
746     "Ruby",
747     "SAX-PD",
748     "Saxpath",
749     "SCEA",
750     "SWL",
751     "SMPPL",
752     "Sendmail",
753     "SGI-B-1.0",
754     "SGI-B-1.1",
755     "SGI-B-2.0",
756     "OFL-1.0",
757     "OFL-1.1",
758     "SimPL-2.0",
759     "Sleepycat",
760     "SNIA",
761     "Spencer-86",
762     "Spencer-94",
763     "Spencer-99",
764     "SMLNJ",
765     "SugarCRM-1.1.3",
766     "SISSL",
767     "SISSL-1.2",
768     "SPL-1.0",
769     "Watcom-1.0",
770     "TCL",
771     "TCP-wrappers",
772     "Unlicense",
773     "TMate",
774     "TORQUE-1.1",
775     "TOSL",
776     "Unicode-DFS-2015",
777     "Unicode-DFS-2016",
778     "Unicode-TOU",
779     "UPL-1.0",
780     "NCSA",
781     "Vim",
782     "VOSTROM",
783     "VSL-1.0",
784     "W3C-20150513",
785     "W3C-19980720",
786     "W3C",
787     "Wsuipa",
788     "Xnet",
789     "X11",
790     "Xerox",
791     "XFree86-1.1",
792     "xinetd",
793     "xpp",
794     "XSkat",
795     "YPL-1.0",
796     "YPL-1.1",
797     "Zed",
798     "Zend-2.0",
799     "Zimbra-1.3",
800     "Zimbra-1.4",
801     "Zlib",
802     "zlib-acknowledgement",
803     "ZPL-1.1",
804     "ZPL-2.0",
805     "ZPL-2.1",
806 ]
807
808 if __name__ == "__main__":
809     main()