From 3c9431128e1f50538fa6bae7f61f47420b6f0a09 Mon Sep 17 00:00:00 2001 From: lethosor Date: Mon, 23 Feb 2015 18:44:19 -0500 Subject: [PATCH] travis: Ignore protobuf generated files --- travis/lint.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/travis/lint.py b/travis/lint.py index 2b41e5987..74be3e853 100644 --- a/travis/lint.py +++ b/travis/lint.py @@ -3,13 +3,14 @@ import re, os, sys valid_extensions = ['c', 'cpp', 'h', 'hpp', 'mm', 'lua', 'rb', 'proto', 'init', 'init-example'] path_blacklist = [ - 'library/include/df/', - 'plugins/stonesense/allegro', - 'plugins/isoworld/allegro', - 'plugins/isoworld/agui', - 'depends/', - '.git/', - 'build', + '^library/include/df/', + '^plugins/stonesense/allegro', + '^plugins/isoworld/allegro', + '^plugins/isoworld/agui', + '^depends/', + '^.git/', + '^build', + '.pb.h', ] def valid_file(filename): @@ -93,7 +94,7 @@ def main(): sys.exit(2) fix = (len(sys.argv) > 2 and sys.argv[2] == '--fix') 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 filename in filenames: