chiark
/
gitweb
/
~ianmdlvl
/
fdroidserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7c0228d
)
lint: warn about extra empty lines
author
Daniel Martí
<mvdan@mvdan.cc>
Fri, 15 May 2015 15:09:00 +0000
(17:09 +0200)
committer
Daniel Martí
<mvdan@mvdan.cc>
Fri, 15 May 2015 15:09:21 +0000
(17:09 +0200)
fdroidserver/lint.py
patch
|
blob
|
history
diff --git
a/fdroidserver/lint.py
b/fdroidserver/lint.py
index 379dd5625e317248369b4eba7472bb0833623e09..fd8000a937271a70f329aa1dfd7337197d46e454 100644
(file)
--- a/
fdroidserver/lint.py
+++ b/
fdroidserver/lint.py
@@
-206,15
+206,20
@@
def main():
if app['Summary'].lower() == name.lower():
warn("Summary '%s' is just the app's name" % app['Summary'])
if app['Summary'].lower() == name.lower():
warn("Summary '%s' is just the app's name" % app['Summary'])
- if app['Summary'] and app['Description'] and len(app['Description']) == 1:
- if app['Summary'].lower() == app['Description'][0].lower():
+ desc = app['Description']
+ if app['Summary'] and desc and len(desc) == 1:
+ if app['Summary'].lower() == desc[0].lower():
warn("Description '%s' is just the app's summary" % app['Summary'])
# Description size limit
warn("Description '%s' is just the app's summary" % app['Summary'])
# Description size limit
- desc_char
s = sum(len(l) for l in app['Description']
)
- if desc_char
s
> config['char_limits']['Description']:
+ desc_char
count = sum(len(l) for l in desc
)
+ if desc_char
count
> config['char_limits']['Description']:
warn("Description of length %s is over the %i char limit" % (
warn("Description of length %s is over the %i char limit" % (
- desc_chars, config['char_limits']['Description']))
+ desc_charcount, config['char_limits']['Description']))
+
+ 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")
# Regex checks in all kinds of fields
for f in regex_warnings:
# Regex checks in all kinds of fields
for f in regex_warnings: