From: Daniel Martí Date: Fri, 14 Aug 2015 05:13:58 +0000 (-0700) Subject: lint: warn about incorrect lists X-Git-Tag: 0.5.0~207 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=fbff41234f86995cc2f2b7e5f18310b3f489b234;p=fdroidserver.git lint: warn about incorrect lists --- diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index 678152da..db4652c2 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -211,6 +211,21 @@ def main(): or any(not desc[l - 1] and not desc[l] for l in range(1, len(desc)))): warn("Description has an extra empty line") + # Check for lists using the wrong characters + validchars = ['*', '#'] + lchar = '' + lcount = 0 + for l in app['Description']: + if len(l) < 1: + continue + if l[0] == lchar: + lcount += 1 + if lcount > 3 and lchar not in validchars: + warn("Description has a list (%s) but it isn't bulleted (*) nor numbered (#)" % lchar) + else: + lchar = l[0] + lcount = 1 + # Regex checks in all kinds of fields for f in regex_warnings: for m, r in regex_warnings[f]: