Changeset 54918 in webkit
- Timestamp:
- Feb 17, 2010 6:13:03 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r54917 r54918 1 2010-02-17 Shinichiro Hamaji <hamaji@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 check-webkit-style: Misses variables that contain underscores. 6 https://bugs.webkit.org/show_bug.cgi?id=33724 7 8 - Check identifiers whose types are unsigned. 9 - Check bitfields properly. 10 11 * Scripts/webkitpy/style/processors/cpp.py: 12 * Scripts/webkitpy/style/processors/cpp_unittest.py: 13 1 14 2010-02-17 Shinichiro Hamaji <hamaji@chromium.org> 2 15 -
trunk/WebKitTools/Scripts/webkitpy/style/processors/cpp.py
r54808 r54918 2426 2426 # simple types, but don't remove simple "long". 2427 2427 line = sub(r'long (long )?(?=long|double|int)', '', line) 2428 line = sub(r'\b(unsigned|signed|inline|using|static|const|volatile|auto|register|extern|typedef|restrict|struct|class|virtual)(?=\W)', '', line) 2428 # Convert unsigned/signed types to simple types, too. 2429 line = sub(r'(unsigned|signed) (?=char|short|int|long)', '', line) 2430 line = sub(r'\b(inline|using|static|const|volatile|auto|register|extern|typedef|restrict|struct|class|virtual)(?=\W)', '', line) 2429 2431 2430 2432 # Remove all template parameters by removing matching < and >. … … 2454 2456 type_regexp = r'\w([\w]|\s*[*&]\s*|::)+' 2455 2457 identifier_regexp = r'(?P<identifier>[\w:]+)' 2458 maybe_bitfield_regexp = r'(:\s*\d+\s*)?' 2456 2459 character_after_identifier_regexp = r'(?P<character_after_identifier>[[;()=,])(?!=)' 2457 declaration_without_type_regexp = r'\s*' + identifier_regexp + r'\s*' + character_after_identifier_regexp2460 declaration_without_type_regexp = r'\s*' + identifier_regexp + r'\s*' + maybe_bitfield_regexp + character_after_identifier_regexp 2458 2461 declaration_with_type_regexp = r'\s*' + type_regexp + r'\s' + declaration_without_type_regexp 2459 2462 is_function_arguments = False … … 2987 2990 processor = CppProcessor(filename, file_extension, error, verbosity) 2988 2991 processor.process(lines) 2989 -
trunk/WebKitTools/Scripts/webkitpy/style/processors/cpp_unittest.py
r54808 r54918 3517 3517 self.assert_lint('short length_;', 3518 3518 'length_' + name_error_message) 3519 self.assert_lint('unsigned _length;', 3520 '_length' + name_error_message) 3521 self.assert_lint('unsigned int _length;', 3522 '_length' + name_error_message) 3523 self.assert_lint('unsigned long long _length;', 3524 '_length' + name_error_message) 3519 3525 3520 3526 # Pointers, references, functions, templates, and adjectives. … … 3613 3619 self.assert_lint('typedef VectorType::const_iterator const_iterator;', '') 3614 3620 3621 # Bitfields. 3622 self.assert_lint('unsigned _fillRule : 1;', 3623 '_fillRule' + name_error_message) 3624 3615 3625 3616 3626 def test_comments(self):
Note: See TracChangeset
for help on using the changeset viewer.