aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy/tidy.py
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-10-27 23:07:53 -0500
committerGitHub <noreply@github.com>2016-10-27 23:07:53 -0500
commitafa55dcf5573d6b535a8e9681d42fe51e1ff01d1 (patch)
treebeb1a99e2593bb374a06e6454d83638b3af2eff3 /python/tidy/servo_tidy/tidy.py
parentfbec79e920c0b0ddeaeeb6c0cc97b20ad85729e0 (diff)
parent303ba20648f7decd1328534baa802dae40893355 (diff)
downloadservo-afa55dcf5573d6b535a8e9681d42fe51e1ff01d1.tar.gz
servo-afa55dcf5573d6b535a8e9681d42fe51e1ff01d1.zip
Auto merge of #13955 - shinglyu:tidy-untrack, r=Wafflespeanut
Don't check untracked file in tidy <!-- Please describe your changes on the following line: --> As discussed in #13938, disabling tidy check on untracked file to reduce noise --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #13938 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because mocking `git` calls for the unit test is probably not worth the effort. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13955) <!-- Reviewable:end -->
Diffstat (limited to 'python/tidy/servo_tidy/tidy.py')
-rw-r--r--python/tidy/servo_tidy/tidy.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index 17a473ea92a..195ca639139 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -830,14 +830,11 @@ def check_dep_license_errors(filenames, progress=True):
def get_file_list(directory, only_changed_files=False, exclude_dirs=[]):
if only_changed_files:
- # only check the files that have been changed since the last merge
+ # only check tracked files that have been changed since the last merge
args = ["git", "log", "-n1", "--author=bors-servo", "--format=%H"]
last_merge = subprocess.check_output(args).strip()
args = ["git", "diff", "--name-only", last_merge, directory]
file_list = subprocess.check_output(args)
- # also check untracked files
- args = ["git", "ls-files", "--others", "--exclude-standard", directory]
- file_list += subprocess.check_output(args)
for f in file_list.splitlines():
f = os.path.join(*f.split("/")) if sys.platform == "win32" else f
if not any(os.path.join('.', os.path.dirname(f)).startswith(path) for path in exclude_dirs):