diff options
author | Timur Borkhodoev <timur.borkhodoev@mail.utoronto.ca> | 2018-02-01 13:57:17 -0500 |
---|---|---|
committer | Timur Borkhodoev <timur.borkhodoev@mail.utoronto.ca> | 2018-02-01 13:57:17 -0500 |
commit | 3919a7f4fd42dbf7f8d5aaf71dae1e74110de857 (patch) | |
tree | 4939a9ec493387541b76d7b11c683fb6d07f9055 /python/tidy/servo_tidy/tidy.py | |
parent | 23bfb54ab24e24c82e9b338e090a23eaf25ee115 (diff) | |
download | servo-3919a7f4fd42dbf7f8d5aaf71dae1e74110de857.tar.gz servo-3919a7f4fd42dbf7f8d5aaf71dae1e74110de857.zip |
Add proper formatting and ignore _mozilla
Diffstat (limited to 'python/tidy/servo_tidy/tidy.py')
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index 2521297585f..5a050d11f4a 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -459,7 +459,7 @@ def rec_parse(current_path, current_node): return dirs -def check_manifest_dirs(config_file): +def check_manifest_dirs(config_file, print_text=True): if not os.path.exists(config_file): print("%s manifest file is required but was not found" % config_file) sys.exit(1) @@ -469,12 +469,16 @@ def check_manifest_dirs(config_file): conf_file = content.read() lines = conf_file.splitlines(True) + if print_text: + print '\rChecking the wpt manifest file...' + p = parser.parse(lines) rv = rec_parse(wpt_path("web-platform-tests"), p) - for path in rv: + for idx, path in enumerate(rv): + if path.endswith("_mozilla"): + continue if not os.path.isdir(path): - print("error {}".format(path)) - return [] + yield(config_file, idx + 1, "Path in manifest was not found: {}".format(path)) def check_rust(file_name, lines): @@ -1174,8 +1178,8 @@ def scan(only_changed_files=False, progress=True, stylo=False): # other lint checks lint_errors = run_lint_scripts(only_changed_files, progress, stylo=stylo) # chain all the iterators - errors = itertools.chain(config_errors, directory_errors, lint_errors, - file_errors, dep_license_errors, manifest_errors) + errors = itertools.chain(config_errors, manifest_errors, directory_errors, lint_errors, + file_errors, dep_license_errors) error = None for error in errors: |