Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include the wpt lint in test-tidy --faster. #9394

Merged
merged 1 commit into from Jan 21, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Include the wpt lint in test-tidy --faster.

  • Loading branch information
Ms2ger committed Jan 21, 2016
commit aa1ae9b355ccd43e221f9e60db5c109c1258d0c2
@@ -512,11 +512,16 @@ def collect_errors_for_files(files_to_check, checking_functions, line_checking_f
yield (filename,) + error


def check_wpt_lint_errors():
def get_wpt_files(only_changed_files=False):
for f in get_file_list("./tests/wpt/web-platform-tests/", only_changed_files):
yield f[len("./tests/wpt/web-platform-tests/"):]


def check_wpt_lint_errors(files):
wpt_working_dir = os.path.abspath(os.path.join(".", "tests", "wpt", "web-platform-tests"))
site.addsitedir(wpt_working_dir)
from tools.lint import lint
returncode = lint.main()
returncode = lint.lint(files)
if returncode:
yield ("WPT Lint Tool", "", "lint error(s) in Web Platform Tests: exit status {0}".format(returncode))

@@ -544,11 +549,7 @@ def scan(faster=False):
errors = collect_errors_for_files(files_to_check, checking_functions, line_checking_functions)

# wpt lint checks
if faster:
print "\033[93mUsing test-tidy \033[01m--faster\033[22m, skipping WPT lint\033[0m"
wpt_lint_errors = iter([])
else:
wpt_lint_errors = check_wpt_lint_errors()
wpt_lint_errors = check_wpt_lint_errors(get_wpt_files(faster))

# collect errors
errors = itertools.chain(errors, wpt_lint_errors)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.