[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 01:11:49 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 132b017fe64d4eb1d64b7604b15c7f0715caf65a
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 18 03:28:09 2010 +0000

    2010-01-17  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Darin Adler.
    
            style-queue complains about one-line macros that include multiple statements
            https://bugs.webkit.org/show_bug.cgi?id=33173
    
            Add an exception for multiple statements on a line that starts a macro.
    
            * Scripts/webkitpy/style/cpp_style.py:
            * Scripts/webkitpy/style/cpp_style_unittest.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53387 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 41a27e1..6361b4e 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,18 @@
 
         Reviewed by Darin Adler.
 
+        style-queue complains about one-line macros that include multiple statements
+        https://bugs.webkit.org/show_bug.cgi?id=33173
+
+        Add an exception for multiple statements on a line that starts a macro.
+
+        * Scripts/webkitpy/style/cpp_style.py:
+        * Scripts/webkitpy/style/cpp_style_unittest.py:
+
+2010-01-17  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Darin Adler.
+
         [check-webkit-style] qt unit testing false positives
         https://bugs.webkit.org/show_bug.cgi?id=32833
 
diff --git a/WebKitTools/Scripts/webkitpy/style/cpp_style.py b/WebKitTools/Scripts/webkitpy/style/cpp_style.py
index 47d922b..ea0a64b 100644
--- a/WebKitTools/Scripts/webkitpy/style/cpp_style.py
+++ b/WebKitTools/Scripts/webkitpy/style/cpp_style.py
@@ -1938,7 +1938,8 @@ def check_style(filename, clean_lines, line_number, file_extension, file_state,
         # It's ok to have many commands in a switch case that fits in 1 line
         and not ((cleansed_line.find('case ') != -1
                   or cleansed_line.find('default:') != -1)
-                 and cleansed_line.find('break;') != -1)):
+                 and cleansed_line.find('break;') != -1)
+        and not cleansed_line.startswith('#define ')):
         error(filename, line_number, 'whitespace/newline', 4,
               'More than one command on the same line')
 
diff --git a/WebKitTools/Scripts/webkitpy/style/cpp_style_unittest.py b/WebKitTools/Scripts/webkitpy/style/cpp_style_unittest.py
index f23d229..42d6c30 100644
--- a/WebKitTools/Scripts/webkitpy/style/cpp_style_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/style/cpp_style_unittest.py
@@ -3018,7 +3018,9 @@ class WebKitStyleTest(CppStyleTestBase):
             '    doSomethingElseAgain();\n'
             '}\n',
             '')
-
+        self.assert_multi_line_lint(
+            '#define TEST_ASSERT(expression) do { if (!(expression)) { TestsController::shared().testFailed(__FILE__, __LINE__, #expression); return; } } while (0)\n',
+            '')
         self.assert_multi_line_lint(
             'if (condition) {\n'
             '    doSomething();\n'

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list