diff options
author | Nikhil Shagrithaya <nikhilshagri@gmail.com> | 2016-07-07 15:06:06 +0530 |
---|---|---|
committer | Nikhil Shagrithaya <nikhilshagri@gmail.com> | 2016-07-07 15:06:06 +0530 |
commit | be98fc4c59f158a25fd91ccde58321bfeb91f247 (patch) | |
tree | 7aa4eac298a2a08d81a162405cd7e596d2c2b642 /python/tidy/servo_tidy/tidy.py | |
parent | 4fafcb121f807c31593bd2f8731358c68b3b7810 (diff) | |
download | servo-be98fc4c59f158a25fd91ccde58321bfeb91f247.tar.gz servo-be98fc4c59f158a25fd91ccde58321bfeb91f247.zip |
tidy command now ignores files in subdirectories of ignored directories
Diffstat (limited to 'python/tidy/servo_tidy/tidy.py')
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index fa0708d403a..234c50727d5 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -636,7 +636,7 @@ def get_file_list(directory, only_changed_files=False, exclude_dirs=[]): args = ["git", "ls-files", "--others", "--exclude-standard", directory] file_list += subprocess.check_output(args) for f in file_list.splitlines(): - if os.path.join('.', os.path.dirname(f)) not in exclude_dirs: + if not any(os.path.join('.', os.path.dirname(f)).startswith(path) for path in exclude_dirs): yield os.path.join('.', f) elif exclude_dirs: for root, dirs, files in os.walk(directory, topdown=True): |