travis: Ignore protobuf generated files

develop
lethosor 2015-02-23 18:44:19 -05:00
parent 5a8c4b5eb7
commit 3c9431128e
1 changed files with 9 additions and 8 deletions

@ -3,13 +3,14 @@ import re, os, sys
valid_extensions = ['c', 'cpp', 'h', 'hpp', 'mm', 'lua', 'rb', 'proto', valid_extensions = ['c', 'cpp', 'h', 'hpp', 'mm', 'lua', 'rb', 'proto',
'init', 'init-example'] 'init', 'init-example']
path_blacklist = [ path_blacklist = [
'library/include/df/', '^library/include/df/',
'plugins/stonesense/allegro', '^plugins/stonesense/allegro',
'plugins/isoworld/allegro', '^plugins/isoworld/allegro',
'plugins/isoworld/agui', '^plugins/isoworld/agui',
'depends/', '^depends/',
'.git/', '^.git/',
'build', '^build',
'.pb.h',
] ]
def valid_file(filename): def valid_file(filename):
@ -93,7 +94,7 @@ def main():
sys.exit(2) sys.exit(2)
fix = (len(sys.argv) > 2 and sys.argv[2] == '--fix') fix = (len(sys.argv) > 2 and sys.argv[2] == '--fix')
global path_blacklist global path_blacklist
path_blacklist = map(lambda s: os.path.join(root_path, s), path_blacklist) path_blacklist = map(lambda s: os.path.join(root_path, s.replace('^', '')) if s.startswith('^') else s, path_blacklist)
for cur, dirnames, filenames in os.walk(root_path): for cur, dirnames, filenames in os.walk(root_path):
for filename in filenames: for filename in filenames: