Title: [157747] trunk/Tools
Revision
157747
Author
m...@apple.com
Date
2013-10-21 15:06:20 -0700 (Mon, 21 Oct 2013)

Log Message

Style checker should allow a space after the @property keyword
https://bugs.webkit.org/show_bug.cgi?id=123117

Reviewed by Anders Carlsson.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing_for_function_call): Allow a space between @property and the following (
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_spacing_for_fncall): Added a test case.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (157746 => 157747)


--- trunk/Tools/ChangeLog	2013-10-21 22:00:40 UTC (rev 157746)
+++ trunk/Tools/ChangeLog	2013-10-21 22:06:20 UTC (rev 157747)
@@ -1,3 +1,15 @@
+2013-10-21  Dan Bernstein  <m...@apple.com>
+
+        Style checker should allow a space after the @property keyword
+        https://bugs.webkit.org/show_bug.cgi?id=123117
+
+        Reviewed by Anders Carlsson.
+
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        (check_spacing_for_function_call): Allow a space between @property and the following (
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+        (CppStyleTest.test_spacing_for_fncall): Added a test case.
+
 2013-10-21  pe...@outlook.com  <pe...@outlook.com>
 
         [WinCairo] Build does not start.

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (157746 => 157747)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2013-10-21 22:00:40 UTC (rev 157746)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2013-10-21 22:06:20 UTC (rev 157747)
@@ -1422,7 +1422,7 @@
             error(line_number, 'whitespace/parens', 2,
                   'Extra space after (')
         if (search(r'\w\s+\(', function_call)
-            and not match(r'\s*(#|typedef)', function_call)):
+            and not match(r'\s*(#|typedef|@property)', function_call)):
             error(line_number, 'whitespace/parens', 4,
                   'Extra space before ( in function call')
         # If the ) is followed only by a newline or a { + newline, assume it's

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (157746 => 157747)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2013-10-21 22:00:40 UTC (rev 157746)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2013-10-21 22:06:20 UTC (rev 157747)
@@ -1631,6 +1631,7 @@
         self.assert_lint('((a+b))', '')
         self.assert_lint('foo (foo)', 'Extra space before ( in function call'
                          '  [whitespace/parens] [4]')
+        self.assert_lint('@property (readonly) NSUInteger count;', '')
         self.assert_lint('#elif (foo(bar))', '')
         self.assert_lint('#elif (foo(bar) && foo(baz))', '')
         self.assert_lint('typedef foo (*foo)(foo)', '')
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to