Changeset 162365 in webkit
- Timestamp:
- Jan 20, 2014 11:39:15 AM (10 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r162358 r162365 1 2014-01-20 Darin Adler <darin@apple.com> 2 3 Update style checker and tests to deal with override instead of OVERRIDE 4 https://bugs.webkit.org/show_bug.cgi?id=127175 5 6 Reviewed by Anders Carlsson. 7 8 * Scripts/webkitpy/style/checkers/cpp.py: 9 (check_braces): Use override instead of OVERRIDE. 10 * Scripts/webkitpy/style/checkers/cpp_unittest.py: 11 (CppStyleTest.test_brace_at_begin_of_line): Ditto. 12 1 13 2014-01-20 Alexey Proskuryakov <ap@apple.com> 2 14 -
trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py
r161535 r162365 2364 2364 # We also allow '#' for #endif and '=' for array initialization. 2365 2365 previous_line = get_previous_non_blank_line(clean_lines, line_number)[0] 2366 if ((not search(r'[;:}{)=]\s*$|\)\s*((const| OVERRIDE)\s*)?(->\s*\S+)?\s*$', previous_line)2366 if ((not search(r'[;:}{)=]\s*$|\)\s*((const|override)\s*)?(->\s*\S+)?\s*$', previous_line) 2367 2367 or search(r'\b(if|for|foreach|while|switch|else|NS_ENUM)\b', previous_line)) 2368 2368 and previous_line.find('#') < 0): 2369 2369 error(line_number, 'whitespace/braces', 4, 2370 2370 'This { should be at the end of the previous line') 2371 elif (search(r'\)\s*(((const| OVERRIDE)\s*)*\s*)?{\s*$', line)2371 elif (search(r'\)\s*(((const|override)\s*)*\s*)?{\s*$', line) 2372 2372 and line.count('(') == line.count(')') 2373 2373 and not search(r'\b(if|for|foreach|while|switch|NS_ENUM)\b', line) -
trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
r161535 r162365 1588 1588 'Place brace on its own line for function definitions. [whitespace/braces] [4]') 1589 1589 self.assert_multi_line_lint( 1590 'int foo() const OVERRIDE{',1590 'int foo() const override {', 1591 1591 'Place brace on its own line for function definitions. [whitespace/braces] [4]') 1592 1592 self.assert_multi_line_lint( 1593 'int foo() OVERRIDE{',1593 'int foo() override {', 1594 1594 'Place brace on its own line for function definitions. [whitespace/braces] [4]') 1595 1595 self.assert_multi_line_lint( … … 1599 1599 '') 1600 1600 self.assert_multi_line_lint( 1601 'int foo() OVERRIDE\n'1601 'int foo() override\n' 1602 1602 '{\n' 1603 1603 '}\n',
Note: See TracChangeset
for help on using the changeset viewer.