diff options
author | PythonNut <PythonNut@users.noreply.github.com> | 2016-01-12 16:48:20 +0000 |
---|---|---|
committer | PythonNut <PythonNut@users.noreply.github.com> | 2016-01-12 21:13:54 +0000 |
commit | fcd33e2b7038f29c2227008ec8bb37796ece4361 (patch) | |
tree | 404d088bccc8953bbb22c7bba89babfc65476ccd /python/tidy.py | |
parent | 3dfa89540aa4b25e21f5c301215067b1ee5053b4 (diff) | |
download | servo-fcd33e2b7038f29c2227008ec8bb37796ece4361.tar.gz servo-fcd33e2b7038f29c2227008ec8bb37796ece4361.zip |
Call WPT lint directly in tidy, fixes #9189
Diffstat (limited to 'python/tidy.py')
-rw-r--r-- | python/tidy.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/python/tidy.py b/python/tidy.py index 0b7c96c9896..a3a7bf65ab9 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -13,6 +13,7 @@ import fnmatch import itertools import re import StringIO +import site import subprocess import sys from licenseck import licenses @@ -556,11 +557,11 @@ def check_reftest_html_files_in_basic_list(reftest_dir): def check_wpt_lint_errors(): wpt_working_dir = os.path.abspath(os.path.join(".", "tests", "wpt", "web-platform-tests")) - lint_cmd = os.path.join(wpt_working_dir, "lint") - try: - subprocess.check_call(lint_cmd, cwd=wpt_working_dir) # Must run from wpt's working dir - except subprocess.CalledProcessError as e: - yield ("WPT Lint Tool", "", "lint error(s) in Web Platform Tests: exit status {0}".format(e.returncode)) + site.addsitedir(wpt_working_dir) + from tools.lint import lint + returncode = lint.main() + if returncode: + yield ("WPT Lint Tool", "", "lint error(s) in Web Platform Tests: exit status {0}".format(returncode)) def get_file_list(directory, only_changed_files=False): |