mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
lint: catch more duplicate links
This commit is contained in:
parent
3638acddc4
commit
ecad89dc05
1 changed files with 11 additions and 5 deletions
|
|
@ -227,12 +227,18 @@ def check_categories(app):
|
||||||
|
|
||||||
|
|
||||||
def check_duplicates(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']:
|
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']
|
name = app['Name'] or app['Auto Name']
|
||||||
if app['Summary'] and name:
|
if app['Summary'] and name:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue