Better scan

This commit is contained in:
Daniel Martí 2013-03-17 12:29:54 +01:00
parent c050279383
commit 4f61623501

View file

@ -1961,7 +1961,8 @@ def scan_source(build_dir, root_dir, thisbuild):
for r,d,f in os.walk(build_dir):
for curfile in f:
if r.find('/.hg/') == -1:
if r.find('/.hg') != -1 or r.find('/.git') != -1:
continue
# Path (relative) to the file...
fp = os.path.join(r, curfile)
@ -1975,9 +1976,12 @@ def scan_source(build_dir, root_dir, thisbuild):
msg = 'Found apk file, which should not be in the source - ' + fp
problems.append(msg)
if curfile.endswith('.java'):
for line in file(fp):
elif curfile.endswith('.so') or curfile.endswith('.elf'):
msg = 'Found ELF at ' + fp
problems.append(msg)
elif curfile.endswith('.java'):
for line in file(fp):
if line.find('DexClassLoader') != -1:
msg = 'Found DexClassLoader in ' + fp
problems.append(msg)