Title: [260355] trunk/Tools
Revision
260355
Author
[email protected]
Date
2020-04-20 01:25:33 -0700 (Mon, 20 Apr 2020)

Log Message

check-webkit-style should not complain about missing config.h header in WebKitLegacy source files
<https://webkit.org/b/210734>

Reviewed by Darin Adler.

* Scripts/webkitpy/style/checkers/cpp.py:
(_NO_CONFIG_H_PATH_PATTERNS):
- Add '^Source/WebKitLegacy/' to the list.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(OrderOfIncludesTest.test_primary_header):
- Add test for Source/WebKitLegacy source file.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (260354 => 260355)


--- trunk/Tools/ChangeLog	2020-04-20 07:11:28 UTC (rev 260354)
+++ trunk/Tools/ChangeLog	2020-04-20 08:25:33 UTC (rev 260355)
@@ -1,3 +1,17 @@
+2020-04-20  David Kilzer  <[email protected]>
+
+        check-webkit-style should not complain about missing config.h header in WebKitLegacy source files
+        <https://webkit.org/b/210734>
+
+        Reviewed by Darin Adler.
+
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        (_NO_CONFIG_H_PATH_PATTERNS):
+        - Add '^Source/WebKitLegacy/' to the list.
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+        (OrderOfIncludesTest.test_primary_header):
+        - Add test for Source/WebKitLegacy source file.
+
 2020-04-19  Brady Eidson  <[email protected]>
 
         Add WKScriptMessageHandler API that asynchronously responds with a promise.

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (260354 => 260355)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2020-04-20 07:11:28 UTC (rev 260354)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2020-04-20 08:25:33 UTC (rev 260355)
@@ -140,6 +140,7 @@
 
 _NO_CONFIG_H_PATH_PATTERNS = [
     '^Source/bmalloc/',
+    '^Source/WebKitLegacy/',
 ]
 
 _EXPORT_MACRO_SPEC = {

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (260354 => 260355)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2020-04-20 07:11:28 UTC (rev 260354)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2020-04-20 08:25:33 UTC (rev 260355)
@@ -3335,6 +3335,13 @@
                                          'Should be: config.h, primary header, blank line, and then '
                                          'alphabetically sorted.  [build/include_order] [4]')
 
+        # Directories in _NO_CONFIG_H_PATH_PATTERNS start with a primary header (no config.h).
+        self.assert_language_rules_check('Source/WebKitLegacy/mac/WebCoreSupport/WebAlternativeTextClient.mm',
+                                         '#import "WebAlternativeTextClient.h"\n'
+                                         '\n'
+                                         '#import "WebViewInternal.h">\n',
+                                         '')
+
         # *SoftLink.cpp files should not include their headers -> no error.
         self.assert_language_rules_check('FooSoftLink.cpp',
                                          '#include "config.h"\n'
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to