From 925fbee3b9a6b911e86488b52f0a063ec423d02a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Fri, 28 Aug 2015 19:05:47 -0700 Subject: [PATCH] lint: complain about unwrapped descriptions --- fdroidserver/lint.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index 1ac83a22..37e26f6d 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -242,6 +242,16 @@ def main(): warn("Description of length %s is over the %i char limit" % ( desc_charcount, config['char_limits']['Description'])) + maxcols = 140 + for l in app['Description']: + if any(l.startswith(c) for c in ['*', '#']): + continue + if any(len(w) > maxcols for w in l.split(' ')): + continue + if len(l) > maxcols: + warn("Description should be wrapped to 80-120 chars") + break + if (not desc[0] or not desc[-1] or any(not desc[l - 1] and not desc[l] for l in range(1, len(desc)))): warn("Description has an extra empty line")