Skip to content
Permalink
Browse files
2010-01-17 Adam Barth <abarth@webkit.org>
        Reviewed by Shinichiro Hamaji.

        check-webkit-style underscore check should be disabled for Qt methods starting with qt_
        https://bugs.webkit.org/show_bug.cgi?id=33663

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

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

Reviewed by Shinichiro Hamaji.

check-webkit-style underscore check should be disabled for Qt methods starting with qt_
https://bugs.webkit.org/show_bug.cgi?id=33663

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

2010-01-17 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.
@@ -2483,6 +2483,8 @@ def check_identifier_name_in_declaration(filename, line_number, line, error):
# 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 modified_identifier.startswith('tst_')
and not modified_identifier.startswith('qt_')
and not modified_identifier.find('::qt_') >= 0
and not modified_identifier == "const_iterator"):
error(filename, line_number, 'readability/naming', 4, identifier + " is incorrectly named. Don't use underscores in your identifier names.")

@@ -3542,6 +3542,10 @@ def test_names(self):
# There is an exception for some unit tests that begin with "tst_".
self.assert_lint('void tst_QWebFrame::arrayObjectEnumerable(int var1, int var2)', '')

# The Qt API uses names that begin with "qt_".
self.assert_lint('void QTFrame::qt_drt_is_awesome(int var1, int var2)', '')
self.assert_lint('void qt_drt_is_awesome(int var1, int var2);', '')

# const_iterator is allowed as well.
self.assert_lint('typedef VectorType::const_iterator const_iterator;', '')

0 comments on commit c571191

Please sign in to comment.