aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy/tidy.py
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-06-14 23:33:52 -0500
committerGitHub <noreply@github.com>2016-06-14 23:33:52 -0500
commitbc2f4c3450787654c955c7b4ce08d98f1f168e70 (patch)
tree8c99f5017ce56c6bae36091323360e7cbee81a34 /python/tidy/servo_tidy/tidy.py
parent40e2b7d674531a36af1f96ac079e036dcaf1304f (diff)
parent28312d0e17f0e19a5999a3faed6c03d43db72b06 (diff)
downloadservo-bc2f4c3450787654c955c7b4ce08d98f1f168e70.tar.gz
servo-bc2f4c3450787654c955c7b4ce08d98f1f168e70.zip
Auto merge of #11621 - h4xr:mach_fix, r=Wafflespeanut
Make mach test-tidy consider ignored dirs Made changes so that mach test-tidy considers the ignored directories Fixes #11386 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11621) <!-- Reviewable:end -->
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 5bc64956a15..7f263aa902a 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -650,11 +650,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: