if len(buildprobs) > 0:
print 'Scanner found ' + str(len(buildprobs)) + ' problems:'
for problem in buildprobs:
- print '...' + problem
+ print ' %s' % problem
if not force:
raise BuildException("Can't build due to " +
str(len(buildprobs)) + " scanned problems")
else:
problems.append('Found %s at %s' % (what, fd))
+ def warnproblem(what, fd, fp):
+ print 'Warning: Found %s at %s' % (what, fd)
+
# Iterate through all files in the source code...
for r,d,f in os.walk(build_dir):
for curfile in f:
handleproblem('binary executable', fd, fp)
elif mime == 'application/jar' and fp.endswith('.apk'):
removeproblem('APK file', fd, fp)
+ elif mime == 'application/jar' and fp.endswith('.jar'):
+ warnproblem('JAR file', fd, fp)
elif curfile.endswith('.java'):
for line in file(fp):