chiark / gitweb /
scanner: avoid checking if usual files are binary
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 14 Sep 2015 05:22:03 +0000 (22:22 -0700)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 14 Sep 2015 05:22:03 +0000 (22:22 -0700)
fdroidserver/scanner.py

index 7f7c6aa9b226a496e80acb436fc5c1efdc76dc08..04d846d5462a957d7bfd063a36ac5f7a0092384b 100644 (file)
@@ -155,6 +155,11 @@ def scan_source(build_dir, root_dir, thisbuild):
                         count += handleproblem('usual suspect at line %d' % i, fd, fp)
                         break
 
+            # These files are often found - avoid checking if they are binary
+            # to speed up the scanner
+            elif ext in ['xml', 'md', 'txt', 'html', 'sh', 'png']:
+                pass
+
             elif is_binary(fp):
                 if is_executable(fp):
                     count += handleproblem('executable binary', fd, fp)