Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1c2ce5ed31e54021f3cd06a3f3b3c149a50cc8e8
      
https://github.com/WebKit/WebKit/commit/1c2ce5ed31e54021f3cd06a3f3b3c149a50cc8e8
  Author: Sam Sneddon <[email protected]>
  Date:   2026-05-04 (Mon, 04 May 2026)

  Changed paths:
    M Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py
    M Tools/Scripts/webkitpy/style/checker.py
    A Tools/Scripts/webkitpy/style/checkers/wpt.py
    A Tools/Scripts/webkitpy/style/checkers/wpt_unittest.py
    M Tools/Scripts/webkitpy/w3c/test_exporter.py
    M Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py
    M Tools/Scripts/webkitpy/w3c/wpt_linter.py

  Log Message:
  -----------
  [WPT export friction] Run WPT lint via check-webkit-style
https://bugs.webkit.org/show_bug.cgi?id=257853
rdar://110843279

Reviewed by Simon Fraser.

Integrate the WPT linter into check-webkit-style so that WPT lint
errors are reported as wpt/lint/<rule> style categories
(e.g. wpt/lint/trailing_whitespace). Individual rules can be
suppressed with the standard --filter mechanism, and errors appear
inline alongside other style violations.

The available rule names are derived dynamically from the upstream WPT
tools/lint/rules.py file. Path-based filter rules suppress known false
positives for WebKit-specific import artifacts: w3c-import.log,
-expected.txt, and the generated .html shims that import-w3c-tests
creates from templated test sources (.any.js, .window.js, .worker.js).

WPTLinter.lint() now yields structured error dicts (from --json
output) instead of returning a return code, which both
check-webkit-style and the WPT test exporter consume.

* Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
(LayoutTestFinder):
(LayoutTestFinder.is_wpt_crash_test):
* Tools/Scripts/webkitpy/style/checker.py:
(_all_categories):
(StyleProcessor.do_association_check):
* Tools/Scripts/webkitpy/style/checkers/wpt.py: Added.
(WPTLintRulesImportError):
(_load_wpt_lint_rules_module):
(_normalize_rule_name):
(wpt_lint_categories):
(run_wpt_lint):
* Tools/Scripts/webkitpy/style/checkers/wpt_unittest.py: Added.
(RunWPTLintTest):
(RunWPTLintTest.test_no_errors):
(RunWPTLintTest.test_reports_each_error):
(RunWPTLintTest.test_filtered_out_errors_are_not_counted):
(NormalizeRuleNameTest):
(NormalizeRuleNameTest.test_spaces_and_hyphens_become_underscores):
(WPTLintCategoriesTest):
(WPTLintCategoriesTest.test_happy_path_contains_known_rules):
(WPTLintCategoriesTest.test_rules_file_absent_returns_only_coarse_category):
(WPTLintCategoriesTest.test_broken_rules_file_raises):
(LoadWPTLintRulesModuleTest):
(LoadWPTLintRulesModuleTest.test_executes_stub_rules_module):
* Tools/Scripts/webkitpy/w3c/test_exporter.py:
(WebPlatformTestExporter.do_export):
* Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest.MockWPTLinter.lint):
* Tools/Scripts/webkitpy/w3c/wpt_linter.py:
(WPTLinter.__init__):
(WPTLinter.lint):
(WPTLinter):
(WPTLinter._run_lint):

Co-Authored-By: Simon Fraser <[email protected]>
Canonical link: https://commits.webkit.org/312533@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to