@@ -544,6 +544,16 @@ def check_reftest_html_files_in_basic_list(reftest_dir):
544
544
yield (file_path , "" , "not found in basic.list" )
545
545
546
546
547
+ def check_wpt_lint_errors ():
548
+ import subprocess
549
+ wpt_working_dir = os .path .abspath (os .path .join ("." , "tests" , "wpt" , "web-platform-tests" ))
550
+ lint_cmd = os .path .join (wpt_working_dir , "lint" )
551
+ try :
552
+ subprocess .check_call (lint_cmd , cwd = wpt_working_dir ) # Must run from wpt's working dir
553
+ except subprocess .CalledProcessError as e :
554
+ yield ("WPT Lint Tool" , "" , "lint error(s) in Web Platform Tests: exit status {0}" .format (e .returncode ))
555
+
556
+
547
557
def scan ():
548
558
all_files = (os .path .join (r , f ) for r , _ , files in os .walk ("." ) for f in files )
549
559
files_to_check = filter (should_check , all_files )
@@ -556,9 +566,9 @@ def scan():
556
566
reftest_to_check = filter (should_check_reftest , reftest_files )
557
567
r_errors = check_reftest_order (reftest_to_check )
558
568
not_found_in_basic_list_errors = check_reftest_html_files_in_basic_list (reftest_dir )
569
+ wpt_lint_errors = check_wpt_lint_errors ()
559
570
560
- errors = list (itertools .chain (errors , r_errors , not_found_in_basic_list_errors ))
561
-
571
+ errors = list (itertools .chain (errors , r_errors , not_found_in_basic_list_errors , wpt_lint_errors ))
562
572
if errors :
563
573
for error in errors :
564
574
print "\033 [94m{}\033 [0m:\033 [93m{}\033 [0m: \033 [91m{}\033 [0m" .format (* error )
0 commit comments