chiark / gitweb /
Warn about misplaced flattr donation links
authorDaniel Martí <mvdan@mvdan.cc>
Wed, 19 Aug 2015 00:53:56 +0000 (17:53 -0700)
committerDaniel Martí <mvdan@mvdan.cc>
Wed, 19 Aug 2015 00:53:56 +0000 (17:53 -0700)
fdroidserver/lint.py

index f255b502f6020cd0627c3ba378d70d5d2e0ebf61..189b52edef5ef4225d95a8ab29b62328c255b8e7 100644 (file)
@@ -63,6 +63,10 @@ regex_warnings = {
         (re.compile(r'.*github\.com/[^/]+/[^/]+[/]*$'),
          "/issues is missing"),
     ],
+    'Donate': http_warnings + [
+        (re.compile(r'.*flattr\.com'),
+         "Flattr donation methods belong in the FlattrID flag"),
+    ],
     'Changelog': http_warnings + [
     ],
     'License': [
@@ -247,6 +251,8 @@ def main():
             for m, r in regex_warnings[f]:
                 t = metadata.metafieldtype(f)
                 if t == 'string':
+                    if app[f] is None:
+                        continue
                     if m.match(app[f]):
                         warn("%s '%s': %s" % (f, app[f], r))
                 elif t == 'multiline':