Title: [275444] trunk/Tools
Revision
275444
Author
[email protected]
Date
2021-04-02 15:20:24 -0700 (Fri, 02 Apr 2021)

Log Message

[check-webkit-style] Check python files in LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=224079
<rdar://problem/76122813>

Reviewed by Dewei Zhu.

* Scripts/webkitpy/style/checker.py:
(CheckerDispatcher.should_skip_without_warning): Never skip style checks on .py files.
* Scripts/webkitpy/style/checker_unittest.py:
(CheckerDispatcherSkipTest.test_should_skip_without_warning__false):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (275443 => 275444)


--- trunk/Tools/ChangeLog	2021-04-02 21:53:30 UTC (rev 275443)
+++ trunk/Tools/ChangeLog	2021-04-02 22:20:24 UTC (rev 275444)
@@ -1,3 +1,16 @@
+2021-04-02  Jonathan Bedard  <[email protected]>
+
+        [check-webkit-style] Check python files in LayoutTests
+        https://bugs.webkit.org/show_bug.cgi?id=224079
+        <rdar://problem/76122813>
+
+        Reviewed by Dewei Zhu.
+
+        * Scripts/webkitpy/style/checker.py:
+        (CheckerDispatcher.should_skip_without_warning): Never skip style checks on .py files.
+        * Scripts/webkitpy/style/checker_unittest.py:
+        (CheckerDispatcherSkipTest.test_should_skip_without_warning__false):
+
 2021-04-02  Chris Fleizach  <[email protected]>
 
         AX: textRectsFromMarkers always fails

Modified: trunk/Tools/Scripts/webkitpy/style/checker.py (275443 => 275444)


--- trunk/Tools/Scripts/webkitpy/style/checker.py	2021-04-02 21:53:30 UTC (rev 275443)
+++ trunk/Tools/Scripts/webkitpy/style/checker.py	2021-04-02 22:20:24 UTC (rev 275444)
@@ -362,6 +362,7 @@
 
 _NEVER_SKIPPED_FILES = _NEVER_SKIPPED_JS_FILES + [
     'TestExpectations',
+    '.py'
 ]
 
 # Files to skip that are less obvious.
@@ -634,8 +635,9 @@
         basename = os.path.basename(file_path)
         if basename.startswith('ChangeLog'):
             return False
-        elif basename in _NEVER_SKIPPED_FILES:
-            return False
+        for suffix in _NEVER_SKIPPED_FILES:
+            if basename.endswith(suffix):
+                return False
         for skipped_file in _SKIPPED_FILES_WITHOUT_WARNING:
             if self._should_skip_file_path(file_path, skipped_file):
                 return True

Modified: trunk/Tools/Scripts/webkitpy/style/checker_unittest.py (275443 => 275444)


--- trunk/Tools/Scripts/webkitpy/style/checker_unittest.py	2021-04-02 21:53:30 UTC (rev 275443)
+++ trunk/Tools/Scripts/webkitpy/style/checker_unittest.py	2021-04-02 22:20:24 UTC (rev 275444)
@@ -347,6 +347,7 @@
         """Test should_skip_without_warning() for False return values."""
         paths = ['foo.txt',
                  os.path.join('LayoutTests', 'ChangeLog'),
+                 os.path.join('LayoutTests', 'foo.py'),
         ]
 
         for path in paths:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to