Bug 224079

Summary: [check-webkit-style] Check python files in LayoutTests
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, cgambrell, dewei_zhu, ews-watchlist, glenn, ryanhaddad, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Jonathan Bedard 2021-04-01 14:48:18 PDT
We should run the style checker over python files in LayoutTests.
Comment 1 Radar WebKit Bug Importer 2021-04-01 14:48:58 PDT
<rdar://problem/76122813>
Comment 2 Jonathan Bedard 2021-04-01 14:52:46 PDT
Created attachment 424951 [details]
Patch
Comment 3 dewei_zhu 2021-04-02 12:06:03 PDT
Comment on attachment 424951 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=424951&action=review

> Tools/Scripts/webkitpy/style/checker.py:640
> -        elif basename in _NEVER_SKIPPED_FILES:
> -            return False
> +        for suffix in _NEVER_SKIPPED_FILES:
> +            if basename.endswith(suffix):
> +                return False

I saw some potential behavior change: `A-TestExpectations` will not return False and now it will?
Comment 4 Jonathan Bedard 2021-04-02 13:38:29 PDT
Comment on attachment 424951 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=424951&action=review

>> Tools/Scripts/webkitpy/style/checker.py:640
>> +                return False
> 
> I saw some potential behavior change: `A-TestExpectations` will not return False and now it will?

Yes, although that may not be a bad thing. First, there isn't anything like "*TestExpectations" in LayoutTests. But more importantly, if we do end up picking up a file we don't expect to, we just end up running the style checker more aggressively than we intended to, which is unlikely to be harmful
Comment 5 dewei_zhu 2021-04-02 14:24:26 PDT
Comment on attachment 424951 [details]
Patch

r=me
Comment 6 EWS 2021-04-02 15:20:27 PDT
Committed r275444: <https://commits.webkit.org/r275444>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 424951 [details].