Bug 280662

Summary: check-webkit-style: file path based skip rules don't work as expected in diff mode with Windows Python
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: Tools / TestsAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=149602

Fujii Hironori
Reported 2024-09-30 21:30:18 PDT
check-webkit-style has a lot of file path based skip rules. https://github.com/WebKit/WebKit/blob/524c5c896dca0d3f5363b0d9cb95558ab3678f06/Tools/Scripts/webkitpy/style/checker.py#L466-L531 Bug#149602 started to use os.path.join and os.path.sep for it. check-webkit-style has two modes, diff mode and file mode. The file path based skip rules don't work as expected in the diff mode. For example, it reports a lot of errors for wpt/tools. PS C:\webkit\wc> python .\Tools\Scripts\check-webkit-style -g 80a60040c517 ERROR: LayoutTests/imported/w3c/web-platform-tests/tools/third_party/html5lib/benchmarks/data/wpt/weighted/test-plan.src.html:1493: Line contains tab character. [whitespace/tab] [5] ERROR: LayoutTests/imported/w3c/web-platform-tests/tools/third_party/pytest/src/_pytest/assertion/rewrite.py:402: whitespace before ':' [pep8/E203] [5] ERROR: LayoutTests/imported/w3c/web-platform-tests/tools/third_party/pytest/src/_pytest/assertion/rewrite.py:406: whitespace before ':' [pep8/E203] [5] ERROR: LayoutTests/imported/w3c/web-platform-tests/tools/third_party/pytest/src/_pytest/compat.py:50: expected 2 blank lines after class or function definition, found 0 [pep8/E305] [5] (....) Total errors found: 121 in 462 files On the other hand, it reports no error in the file mode. PS C:\webkit\wc> python .\Tools\Scripts\check-webkit-style LayoutTests/imported/w3c/web-platform-tests/tools/third_party/html5lib/benchmarks/data/wpt/weighted/test-plan.src.html Total errors found: 0 in 1 files This is the expected behavior because LayoutTests/imported directory is included in the file path based skip rules.
Attachments
Fujii Hironori
Comment 1 2024-09-30 23:12:12 PDT
EWS
Comment 2 2024-10-01 14:14:03 PDT
Committed 284512@main (3cd22d8b9069): <https://commits.webkit.org/284512@main> Reviewed commits have been landed. Closing PR #34491 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2024-10-01 14:16:12 PDT
Note You need to log in before you can comment on or make changes to this bug.