Title: [253618] trunk/Tools
Revision
253618
Author
[email protected]
Date
2019-12-17 02:17:18 -0800 (Tue, 17 Dec 2019)

Log Message

check-webkit-style: allow underscores for public symbols in JSC GLIB API
https://bugs.webkit.org/show_bug.cgi?id=205265

Reviewed by Jonathan Bedard.

Add an exception for symbols starting with jsc_ in glib directories.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_identifier_name_in_declaration):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_names):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (253617 => 253618)


--- trunk/Tools/ChangeLog	2019-12-17 10:11:39 UTC (rev 253617)
+++ trunk/Tools/ChangeLog	2019-12-17 10:17:18 UTC (rev 253618)
@@ -1,3 +1,17 @@
+2019-12-17  Carlos Garcia Campos  <[email protected]>
+
+        check-webkit-style: allow underscores for public symbols in JSC GLIB API
+        https://bugs.webkit.org/show_bug.cgi?id=205265
+
+        Reviewed by Jonathan Bedard.
+
+        Add an exception for symbols starting with jsc_ in glib directories.
+
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        (check_identifier_name_in_declaration):
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+        (WebKitStyleTest.test_names):
+
 2019-12-16  Jonathan Bedard  <[email protected]>
 
         test-lldb-webkit: Run in CI

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


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2019-12-17 10:11:39 UTC (rev 253617)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2019-12-17 10:17:18 UTC (rev 253618)
@@ -3638,6 +3638,7 @@
             # Various exceptions to the rule: _javascript_ op codes functions, const_iterator.
             if (not (filename.find('_javascript_Core') >= 0 and (modified_identifier.find('op_') >= 0 or modified_identifier.find('intrinsic_') >= 0))
                 and not (('gtk' in filename or 'glib' in filename or 'wpe' in filename or 'atk' in filename) and modified_identifier.startswith('webkit_'))
+                and not ('glib' in filename and modified_identifier.startswith('jsc_'))
                 and not modified_identifier.startswith('tst_')
                 and not modified_identifier.startswith('webkit_dom_object_')
                 and not modified_identifier.startswith('webkit_soup')

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


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2019-12-17 10:11:39 UTC (rev 253617)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2019-12-17 10:17:18 UTC (rev 253618)
@@ -5471,6 +5471,15 @@
             'otherkit_web_view_load is incorrectly named. Don\'t use underscores in your identifier names.'
             '  [readability/naming/underscores] [4]', 'Source/Webkit/webkit/foo.cpp')
 
+        # There is an exception for GLib _javascript_Core API.
+        self.assert_lint('JSCValue* jsc_value_new_null(JSCContext* context)', '', 'Source/_javascript_Core/API/glib/JSCValue.cpp')
+        self.assert_lint('void my_function(int variable_1)',
+                         ['my_function' + name_underscore_error_message,
+                          'variable_1' + name_underscore_error_message],
+                         'Source/_javascript_Core/API/glib/JSCValue.cpp')
+        self.assert_lint('gboolean jsc_value_is_undefined(JSCValue* value)',
+                         'jsc_value_is_undefined' + name_underscore_error_message)
+
         # There is an exception for some unit tests that begin with "tst_".
         self.assert_lint('void tst_QWebFrame::arrayObjectEnumerable(int var1, int var2)', '')
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to