chiark / gitweb /
lint: catch more duplicate links
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 12 Sep 2015 06:30:59 +0000 (23:30 -0700)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 12 Sep 2015 06:30:59 +0000 (23:30 -0700)
fdroidserver/lint.py

index ad6f4f5c159a628975fc60f97feac4dfd3ae794b..ca78ad485fa67dccbc846ffe09aca12ac48922b4 100644 (file)
@@ -227,12 +227,18 @@ def check_categories(app):
 
 
 def check_duplicates(app):
-    if app['Web Site'] and app['Source Code']:
-        if app['Web Site'].lower() == app['Source Code'].lower():
-            yield "Website '%s' is just the app's source code link" % app['Web Site']
-
     if app['Name'] and app['Name'] == app['Auto Name']:
-        yield "Name '%s' is just the auto name" % app['Name']
+        yield "Name '%s' is just the auto name - remove it" % app['Name']
+
+    links_seen = set()
+    for f in ['Source Code', 'Web Site', 'Issue Tracker', 'Changelog']:
+        if not app[f]:
+            continue
+        v = app[f].lower()
+        if v in links_seen:
+            yield "Duplicate link in '%s': %s" % (f, v)
+        else:
+            links_seen.add(v)
 
     name = app['Name'] or app['Auto Name']
     if app['Summary'] and name: