mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
lint: Also warn about descriptions that are just the summary
This commit is contained in:
parent
3d1213b602
commit
96f49f2a9e
1 changed files with 8 additions and 10 deletions
|
|
@ -184,17 +184,15 @@ def main():
|
||||||
warn("Summary of length %s is over the %i char limit" % (
|
warn("Summary of length %s is over the %i char limit" % (
|
||||||
summ_chars, config['char_limits']['Summary']))
|
summ_chars, config['char_limits']['Summary']))
|
||||||
|
|
||||||
# Redundant summaries
|
# Redundant summaries or descriptions
|
||||||
summary = app['Summary']
|
|
||||||
name = app['Name'] or app['Auto Name']
|
name = app['Name'] or app['Auto Name']
|
||||||
if summary and name:
|
if app['Summary'] and name:
|
||||||
summary_l = summary.lower()
|
if app['Summary'].lower() == name.lower():
|
||||||
name_l = name.lower()
|
warn("Summary '%s' is just the app's name" % app['Summary'])
|
||||||
if summary_l == name_l:
|
|
||||||
warn("Summary '%s' is just the app's name" % summary)
|
if app['Summary'] and app['Description']:
|
||||||
elif (summary_l in name_l or name_l in summary_l):
|
if app['Summary'].lower() == app['Description'][0].lower():
|
||||||
pwarn("Summary '%s' probably contains redundant info already in app name '%s'" % (
|
warn("Description '%s' is just the app's summary" % app['Summary'])
|
||||||
summary, name))
|
|
||||||
|
|
||||||
# Description size limit
|
# Description size limit
|
||||||
desc_chars = sum(len(l) for l in app['Description'])
|
desc_chars = sum(len(l) for l in app['Description'])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue