aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy
diff options
context:
space:
mode:
authorMitchell Hentges <mitchhentges@protonmail.com>2016-05-19 19:37:16 +0200
committerMitchell Hentges <mitchhentges@protonmail.com>2016-05-24 22:23:37 +0200
commit29da4621362b756ea5f970a74f3f74c01ad0412c (patch)
tree96c5043c4ce944fedfe852b0d86f026cb09dc441 /python/tidy/servo_tidy
parentdea610986dbf4a1e5898cbe6b57832784e786f3a (diff)
downloadservo-29da4621362b756ea5f970a74f3f74c01ad0412c.tar.gz
servo-29da4621362b756ea5f970a74f3f74c01ad0412c.zip
Add --all for test-tidy, with backwards-compat with --faster
Diffstat (limited to 'python/tidy/servo_tidy')
-rw-r--r--python/tidy/servo_tidy/tidy.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index 65078c5b771..5baca6749ab 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -101,8 +101,8 @@ def filter_file(file_name):
return True
-def filter_files(start_dir, faster, progress):
- file_iter = get_file_list(start_dir, faster, ignored_dirs)
+def filter_files(start_dir, only_changed_files, progress):
+ file_iter = get_file_list(start_dir, only_changed_files, ignored_dirs)
(has_element, file_iter) = is_iter_empty(file_iter)
if not has_element:
raise StopIteration
@@ -649,14 +649,14 @@ def get_file_list(directory, only_changed_files=False, exclude_dirs=[]):
yield os.path.join(root, f)
-def scan(faster=False, progress=True):
+def scan(only_changed_files=False, progress=True):
# standard checks
- files_to_check = filter_files('.', faster, progress)
+ files_to_check = filter_files('.', only_changed_files, progress)
checking_functions = (check_flake8, check_lock, check_webidl_spec, check_json)
line_checking_functions = (check_license, check_by_line, check_toml, check_rust, check_spec, check_modeline)
errors = collect_errors_for_files(files_to_check, checking_functions, line_checking_functions)
# wpt lint checks
- wpt_lint_errors = check_wpt_lint_errors(get_wpt_files(faster, progress))
+ wpt_lint_errors = check_wpt_lint_errors(get_wpt_files(only_changed_files, progress))
# collect errors
errors = itertools.chain(errors, wpt_lint_errors)
error = None