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

Make unspecified license use regex

This commit is contained in:
Daniel Martí 2014-05-30 18:48:35 +02:00
parent 969a568430
commit 5933880a90

View File

@ -73,6 +73,10 @@ regex_warnings = {
(re.compile(r'.*[^sS]://gitorious\.org/.*'), (re.compile(r'.*[^sS]://gitorious\.org/.*'),
"gitorious URLs should always use https:// not http://"), "gitorious URLs should always use https:// not http://"),
], ],
'License': [
(re.compile(r'^(|None|Unknown)$'),
"No license specified"),
],
'Description': [ 'Description': [
(re.compile(r'^No description available$'), (re.compile(r'^No description available$'),
"Description yet to be filled"), "Description yet to be filled"),
@ -98,9 +102,9 @@ regex_pedantic = {
], ],
'Repo': [ 'Repo': [
(re.compile(r'^http://.*'), (re.compile(r'^http://.*'),
"if https:// is available, use it instead of http://"), "use https:// if available"),
(re.compile(r'^svn://.*'), (re.compile(r'^svn://.*'),
"if https:// is available, use it instead of svn://"), "use https:// if available"),
], ],
'Issue Tracker': [ 'Issue Tracker': [
(re.compile(r'.*code\.google\.com/p/[^/]+/issues/.*'), (re.compile(r'.*code\.google\.com/p/[^/]+/issues/.*'),
@ -175,10 +179,6 @@ def main():
pwarn("Last used commit '%s' looks like a tag, but Update Check Mode is '%s'" % ( pwarn("Last used commit '%s' looks like a tag, but Update Check Mode is '%s'" % (
lastcommit, app['Update Check Mode'])) lastcommit, app['Update Check Mode']))
# No proper license
if app['License'] in ('Unknown', 'None', ''):
warn("License was not set")
# Summary size limit # Summary size limit
summ_chars = len(app['Summary']) summ_chars = len(app['Summary'])
if summ_chars > config['char_limits']['Summary']: if summ_chars > config['char_limits']['Summary']: