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