Changeset 69953 in webkit
- Timestamp:
- Oct 18, 2010 4:57:36 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r69952 r69953 1 2010-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 1 12 2010-10-18 MORITA Hajime <morrita@google.com> 2 13 -
trunk/WebKitTools/Scripts/webkitpy/style/checker.py
r66120 r69953 143 143 "/ForwardingHeaders/"], 144 144 ["-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"]), 145 149 146 150 # For third-party Python code, keep only the following checks-- -
trunk/WebKitTools/Scripts/webkitpy/style/checkers/cpp.py
r67722 r69953 2513 2513 if modified_identifier.find('_') >= 0: 2514 2514 # 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) 2516 2516 and not modified_identifier.startswith('tst_') 2517 2517 and not modified_identifier.startswith('webkit_dom_object_') … … 2522 2522 and not modified_identifier.startswith('cairo_') 2523 2523 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"): 2525 2526 error(line_number, 'readability/naming', 4, identifier + " is incorrectly named. Don't use underscores in your identifier names.") 2526 2527 -
trunk/WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py
r67722 r69953 3691 3691 # There is an exception for op code functions but only in the JavaScriptCore directory. 3692 3692 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') 3693 3694 self.assert_lint('void this_op_code(int var1, int var2)', 'this_op_code' + name_underscore_error_message) 3694 3695 … … 3716 3717 # const_iterator is allowed as well. 3717 3718 self.assert_lint('typedef VectorType::const_iterator const_iterator;', '') 3719 3720 # vm_throw is allowed as well. 3721 self.assert_lint('int vm_throw;', '') 3718 3722 3719 3723 # Bitfields.
Note: See TracChangeset
for help on using the changeset viewer.