Skip to content
Permalink
Browse files
2010-01-21 Adam Barth <abarth@webkit.org>
        Reviewed by David Levin.

        [style-queue] should not complain about identifier names with underscores under WebKit/gtk/webkit/
        https://bugs.webkit.org/show_bug.cgi?id=33356

        White list unix_hacker_style names in WebKit/gtk/webkit because these
        are used in the GTK+ API.

        * Scripts/webkitpy/style/cpp_style.py:
        * Scripts/webkitpy/style/cpp_style_unittest.py:

Canonical link: https://commits.webkit.org/45035@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@53636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Jan 21, 2010
1 parent a22251c commit ebda764dee0646347c9cbfbf937f2a58155ba608
Showing with 17 additions and 0 deletions.
  1. +13 −0 WebKitTools/ChangeLog
  2. +1 −0 WebKitTools/Scripts/webkitpy/style/cpp_style.py
  3. +3 −0 WebKitTools/Scripts/webkitpy/style/cpp_style_unittest.py
@@ -1,3 +1,16 @@
2010-01-21 Adam Barth <abarth@webkit.org>

Reviewed by David Levin.

[style-queue] should not complain about identifier names with underscores under WebKit/gtk/webkit/
https://bugs.webkit.org/show_bug.cgi?id=33356

White list unix_hacker_style names in WebKit/gtk/webkit because these
are used in the GTK+ API.

* Scripts/webkitpy/style/cpp_style.py:
* Scripts/webkitpy/style/cpp_style_unittest.py:

2010-01-21 Diego Gonzalez <diego.gonzalez@openbossa.org>

Reviewed by Kenneth Rohde Christiansen.
@@ -2469,6 +2469,7 @@ def check_identifier_name_in_declaration(filename, line_number, line, error):
if modified_identifier.find('_') >= 0:
# Various exceptions to the rule: JavaScript op codes functions, const_iterator.
if (not (filename.find('JavaScriptCore') >= 0 and modified_identifier.find('_op_') >= 0)
and not filename.find('WebKit/gtk/webkit/') >= 0
and not modified_identifier.startswith('tst_')
and not modified_identifier.startswith('webkit_dom_object_')
and not modified_identifier.startswith('qt_')
@@ -3578,6 +3578,9 @@ def test_names(self):
self.assert_lint('void webkit_dom_object_init();', '')
self.assert_lint('void webkit_dom_object_class_init();', '')

# The GTK+ APIs use GTK+ naming style, which includes lower-cased, _-separated values.
self.assert_lint('void this_is_a_gtk_style_name(int var1, int var2)', '', 'WebKit/gtk/webkit/foo.cpp')

# There is an exception for some unit tests that begin with "tst_".
self.assert_lint('void tst_QWebFrame::arrayObjectEnumerable(int var1, int var2)', '')

0 comments on commit ebda764

Please sign in to comment.