chiark / gitweb /
lint: Also warn about descriptions that are just the summary
authorDaniel Martí <mvdan@mvdan.cc>
Sun, 24 Aug 2014 22:41:25 +0000 (00:41 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Sun, 24 Aug 2014 22:41:25 +0000 (00:41 +0200)
fdroidserver/lint.py

index 192da1a6913051a0bddae7d47bd37885e0ac4fc1..30a1807c57b0852cd6a58a5e104e04fff983c6b6 100644 (file)
@@ -184,17 +184,15 @@ def main():
             warn("Summary of length %s is over the %i char limit" % (
                 summ_chars, config['char_limits']['Summary']))
 
-        # Redundant summaries
-        summary = app['Summary']
+        # Redundant summaries or descriptions
         name = app['Name'] or app['Auto Name']
-        if summary and name:
-            summary_l = summary.lower()
-            name_l = name.lower()
-            if summary_l == name_l:
-                warn("Summary '%s' is just the app's name" % summary)
-            elif (summary_l in name_l or name_l in summary_l):
-                pwarn("Summary '%s' probably contains redundant info already in app name '%s'" % (
-                    summary, name))
+        if app['Summary'] and name:
+            if app['Summary'].lower() == name.lower():
+                warn("Summary '%s' is just the app's name" % app['Summary'])
+
+        if app['Summary'] and app['Description']:
+            if app['Summary'].lower() == app['Description'][0].lower():
+                warn("Description '%s' is just the app's summary" % app['Summary'])
 
         # Description size limit
         desc_chars = sum(len(l) for l in app['Description'])