Changeset 69953 in webkit


Ignore:
Timestamp:
Oct 18, 2010 4:57:36 AM (14 years ago)
Author:
levin@chromium.org
Message:

2010-10-18 David Levin <levin@chromium.org>

Reviewed by Oliver Hunt.

check-webkit-style needs to ignore underscores in opcode names and vm_throw
https://bugs.webkit.org/show_bug.cgi?id=47789

  • Scripts/webkitpy/style/checker.py: Added the exception for the assembler directory.
  • Scripts/webkitpy/style/checkers/cpp.py: Added special cased names.
  • Scripts/webkitpy/style/checkers/cpp_unittest.py: Added unit tests for the special cases.
Location:
trunk/WebKitTools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r69952 r69953  
     12010-10-18  David Levin  <levin@chromium.org>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        check-webkit-style needs to ignore underscores in opcode names and vm_throw
     6        https://bugs.webkit.org/show_bug.cgi?id=47789
     7
     8        * Scripts/webkitpy/style/checker.py: Added the exception for the assembler directory.
     9        * Scripts/webkitpy/style/checkers/cpp.py: Added special cased names.
     10        * Scripts/webkitpy/style/checkers/cpp_unittest.py: Added unit tests for the special cases.
     11
    1122010-10-18  MORITA Hajime  <morrita@google.com>
    213
  • trunk/WebKitTools/Scripts/webkitpy/style/checker.py

    r66120 r69953  
    143143      "/ForwardingHeaders/"],
    144144     ["-build/header_guard"]),
     145    ([# assembler has lots of opcodes that use underscores, so
     146      # we on't check for underscores in that directory.
     147      "/JavaScriptCore/assembler/"],
     148     ["-readability/naming"]),
    145149
    146150    # For third-party Python code, keep only the following checks--
  • trunk/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py

    r67722 r69953  
    25132513        if modified_identifier.find('_') >= 0:
    25142514            # Various exceptions to the rule: JavaScript op codes functions, const_iterator.
    2515             if (not (filename.find('JavaScriptCore') >= 0 and modified_identifier.find('_op_') >= 0)
     2515            if (not (filename.find('JavaScriptCore') >= 0 and modified_identifier.find('op_') >= 0)
    25162516                and not modified_identifier.startswith('tst_')
    25172517                and not modified_identifier.startswith('webkit_dom_object_')
     
    25222522                and not modified_identifier.startswith('cairo_')
    25232523                and not modified_identifier.find('::qt_') >= 0
    2524                 and not modified_identifier == "const_iterator"):
     2524                and not modified_identifier == "const_iterator"
     2525                and not modified_identifier == "vm_throw"):
    25252526                error(line_number, 'readability/naming', 4, identifier + " is incorrectly named. Don't use underscores in your identifier names.")
    25262527
  • trunk/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py

    r67722 r69953  
    36913691        # There is an exception for op code functions but only in the JavaScriptCore directory.
    36923692        self.assert_lint('void this_op_code(int var1, int var2)', '', 'JavaScriptCore/foo.cpp')
     3693        self.assert_lint('void op_code(int var1, int var2)', '', 'JavaScriptCore/foo.cpp')
    36933694        self.assert_lint('void this_op_code(int var1, int var2)', 'this_op_code' + name_underscore_error_message)
    36943695
     
    37163717        # const_iterator is allowed as well.
    37173718        self.assert_lint('typedef VectorType::const_iterator const_iterator;', '')
     3719
     3720        # vm_throw is allowed as well.
     3721        self.assert_lint('int vm_throw;', '')
    37183722
    37193723        # Bitfields.
Note: See TracChangeset for help on using the changeset viewer.