mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
lint: also do http warnings on descriptions
This commit is contained in:
parent
80371da133
commit
41fd1e86af
1 changed files with 10 additions and 1 deletions
|
|
@ -122,6 +122,8 @@ categories = Set([
|
||||||
"Wallpaper",
|
"Wallpaper",
|
||||||
])
|
])
|
||||||
|
|
||||||
|
desc_url = re.compile("[^[]\[([^ ]+)( |\]|$)")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
|
|
@ -247,6 +249,13 @@ def main():
|
||||||
for l in app['Description']:
|
for l in app['Description']:
|
||||||
if len(l) < 1:
|
if len(l) < 1:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
for um in desc_url.finditer(l):
|
||||||
|
url = um.group(1)
|
||||||
|
for m, r in http_warnings:
|
||||||
|
if m.match(url):
|
||||||
|
warn("URL '%s' in Description: %s" % (url, r))
|
||||||
|
|
||||||
c = l.decode('utf-8')[0]
|
c = l.decode('utf-8')[0]
|
||||||
if c == lchar:
|
if c == lchar:
|
||||||
lcount += 1
|
lcount += 1
|
||||||
|
|
@ -265,7 +274,7 @@ def main():
|
||||||
if v is None:
|
if v is None:
|
||||||
continue
|
continue
|
||||||
if m.match(v):
|
if m.match(v):
|
||||||
warn("%s '%s': %s" % (f, app[f], r))
|
warn("%s '%s': %s" % (f, v, r))
|
||||||
elif type(v) == list:
|
elif type(v) == list:
|
||||||
for l in v:
|
for l in v:
|
||||||
if m.match(l):
|
if m.match(l):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue