Changeset 199958 in webkit


Ignore:
Timestamp:
Apr 23, 2016 7:25:46 PM (8 years ago)
Author:
aestes@apple.com
Message:

check-webkit-style: fix false-positive warnings about @synchronized
https://bugs.webkit.org/show_bug.cgi?id=156957

Reviewed by Dan Bernstein.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_spacing_for_function_call): Ignore @synchronized lines.
(check_braces): Ditto.

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTest.test_brace_at_begin_of_line): Added a test case.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r199916 r199958  
     12016-04-23  Andy Estes  <aestes@apple.com>
     2
     3        check-webkit-style: fix false-positive warnings about @synchronized
     4        https://bugs.webkit.org/show_bug.cgi?id=156957
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * Scripts/webkitpy/style/checkers/cpp.py:
     9        (check_spacing_for_function_call): Ignore @synchronized lines.
     10        (check_braces): Ditto.
     11        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
     12        (CppStyleTest.test_brace_at_begin_of_line): Added a test case.
     13
    1142016-04-22  Srinivasan Vijayaraghavan  <svijayaraghavan@apple.com>
    215
  • trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py

    r199288 r199958  
    14771477                  'Extra space after (')
    14781478        if (search(r'\w\s+\(', function_call)
    1479             and not match(r'\s*((#|typedef|@property|@interface|@implementation)|} @catch\b)', function_call)):
     1479            and not match(r'\s*((#|typedef|@property|@interface|@implementation|@synchronized)|} @catch\b)', function_call)):
    14801480            error(line_number, 'whitespace/parens', 4,
    14811481                  'Extra space before ( in function call')
     
    24272427    elif (search(r'\)\s*(((const|override)\s*)*\s*)?{\s*$', line)
    24282428          and line.count('(') == line.count(')')
    2429           and not search(r'(\b(if|for|while|switch|NS_ENUM)|} @catch)\b', line)
     2429          and not search(r'(\s*(if|for|while|switch|NS_ENUM|@synchronized)|} @catch)\b', line)
    24302430          and not match(r'\s+[A-Z_][A-Z_0-9]+\b', line)):
    24312431        error(line_number, 'whitespace/braces', 4,
  • trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py

    r199288 r199958  
    17881788            '    @try {\n'
    17891789            '    } @catch (NSException *exception) {\n'
     1790            '    }\n',
     1791            '')
     1792        self.assert_multi_line_lint(
     1793            '    @synchronized (self) {\n'
    17901794            '    }\n',
    17911795            '')
Note: See TracChangeset for help on using the changeset viewer.