mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
scanner: ignore gradle comment lines
Useful to detect: maven { // foo url "http://foo.bar" }
This commit is contained in:
parent
75b1c029ac
commit
f7e9022217
@ -191,7 +191,8 @@ def scan_source(build_dir, root_dir, thisbuild):
|
||||
if is_used_by_gradle(line):
|
||||
for name in suspects_found(line):
|
||||
count += handleproblem('usual supect \'%s\' at line %d' % (name, i+1), fd, fp)
|
||||
joined = re.sub(r'[\n\r\s]+', ' ', ' '.join(lines))
|
||||
noncomment_lines = [l for l in lines if not common.gradle_comment.match(l)]
|
||||
joined = re.sub(r'[\n\r\s]+', ' ', ' '.join(noncomment_lines))
|
||||
for m in gradle_mavenrepo.finditer(joined):
|
||||
url = m.group(2)
|
||||
if not any(r.match(url) for r in allowed_repos):
|
||||
|
Loading…
Reference in New Issue
Block a user