1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-09 00:40:11 +01:00

Warn about misplaced flattr donation links

This commit is contained in:
Daniel Martí 2015-08-18 17:53:56 -07:00
parent 57ba6f0307
commit b9397733c3

View File

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