chiark / gitweb /
lint: complain about unwrapped descriptions
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 29 Aug 2015 02:05:47 +0000 (19:05 -0700)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 29 Aug 2015 02:05:47 +0000 (19:05 -0700)
fdroidserver/lint.py

index 1ac83a22893b24a7e03119e08901823e45f0b209..37e26f6de49c9a17eda86c5845fd413673b7fcfc 100644 (file)
@@ -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")