aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy/tidy.py
diff options
context:
space:
mode:
authorSaurabh Badhwar <sbsaurabhbadhwar9@gmail.com>2016-06-05 19:07:34 +0530
committerSaurabh Badhwar <sbsaurabhbadhwar9@gmail.com>2016-06-15 09:58:04 +0530
commit28312d0e17f0e19a5999a3faed6c03d43db72b06 (patch)
treec70afcd915bde5bb1afb3e42c9981dd6a705ba02 /python/tidy/servo_tidy/tidy.py
parent573c0a74684dc0043da4800a84065d72453641fd (diff)
downloadservo-28312d0e17f0e19a5999a3faed6c03d43db72b06.tar.gz
servo-28312d0e17f0e19a5999a3faed6c03d43db72b06.zip
Make mach consider ignored dirs
Address indentation changes
Diffstat (limited to 'python/tidy/servo_tidy/tidy.py')
-rw-r--r--python/tidy/servo_tidy/tidy.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index 5b66d2911e4..0c8a6211034 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -645,11 +645,12 @@ 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():
- yield os.path.join('.', f)
+ if os.path.join('.', os.path.dirname(f)) not in ignored_dirs:
+ yield os.path.join('.', f)
elif exclude_dirs:
for root, dirs, files in os.walk(directory, topdown=True):
# modify 'dirs' in-place so that we don't do unwanted traversals in excluded directories
- dirs[:] = [d for d in dirs if not any(os.path.join(root, d).startswith(name) for name in ignored_dirs)]
+ dirs[:] = [d for d in dirs if not any(os.path.join(root, d).startswith(name) for name in exclude_dirs)]
for rel_path in files:
yield os.path.join(root, rel_path)
else: