From: Daniel Martí Date: Tue, 18 Mar 2014 11:26:24 +0000 (+0100) Subject: A couple more rules for lint X-Git-Tag: 0.2~182 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=03975808a3f2f32657c4e3156124d73fd62bbcae;p=fdroidserver.git A couple more rules for lint --- diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index b8faaf12..0492b77a 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -106,6 +106,8 @@ regex_pedantic = { "No need to specify that the app is... an app"), (re.compile(r'.*\b(free software|open source)\b.*', re.IGNORECASE), "No need to specify that the app is Free Software"), + (re.compile(r'.*[.,!?].*'), + "Punctuation should be avoided"), ], } @@ -180,12 +182,6 @@ def main(): warn("Description of length %s is over the %i char limit" % ( desc_chars, config['char_limits']['Description'])) - # No punctuation in summary - if app['Summary']: - lastchar = app['Summary'][-1] - if any(lastchar==c for c in '.,!?'): - warn("Summary should not end with a %s" % lastchar) - # Regex checks in all kinds of fields for f in regex_warnings: for m, r in regex_warnings[f]: @@ -205,6 +201,11 @@ def main(): if 'commit' in build: if build['commit'].startswith(n): warn("Branch '%s' used as commit" % n) + if 'srclibs' in build: + for srclib in build['srclibs']: + ref = srclib.split('@')[1].split('/')[0] + if ref.startswith(n): + warn("Branch '%s' used as srclib commit" % n) if not appid: print