[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
levin at chromium.org
levin at chromium.org
Tue Jan 5 23:45:20 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 3db5c67da28031adb2beaad54091b816ac61a5bf
Author: levin at chromium.org <levin at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 8 23:54:57 2009 +0000
[check-webkit-style] False positive for DEFINE_OPCODE(op_jtrue) {
https://bugs.webkit.org/show_bug.cgi?id=32193
Reviewed by Adam Barth.
* Scripts/modules/cpp_style.py: For the function { rule, if there is space
at the beginning of line, ignore lines which then have a macro.
* Scripts/modules/cpp_style_unittest.py: Add tests to verify the
new behavior.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 9f525f2..fc55598 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,15 @@
+2009-12-08 David Levin <levin at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [check-webkit-style] False positive for DEFINE_OPCODE(op_jtrue) {
+ https://bugs.webkit.org/show_bug.cgi?id=32193
+
+ * Scripts/modules/cpp_style.py: For the function { rule, if there is space
+ at the beginning of line, ignore lines which then have a macro.
+ * Scripts/modules/cpp_style_unittest.py: Add tests to verify the
+ new behavior.
+
2009-12-08 Dmitry Titov <dimich at chromium.org>
Rubber-stamped by David Levin.
diff --git a/WebKitTools/Scripts/modules/cpp_style.py b/WebKitTools/Scripts/modules/cpp_style.py
index 37d7414..d8ca8d1 100644
--- a/WebKitTools/Scripts/modules/cpp_style.py
+++ b/WebKitTools/Scripts/modules/cpp_style.py
@@ -1901,7 +1901,8 @@ def check_braces(filename, clean_lines, line_number, error):
'This { should be at the end of the previous line')
elif (search(r'\)\s*(const\s*)?{\s*$', line)
and line.count('(') == line.count(')')
- and not search(r'\b(if|for|foreach|while|switch)\b', line)):
+ and not search(r'\b(if|for|foreach|while|switch)\b', line)
+ and not match(r'\s+[A-Z_][A-Z_0-9]+\b', line)):
error(filename, line_number, 'whitespace/braces', 4,
'Place brace on its own line for function definitions.')
diff --git a/WebKitTools/Scripts/modules/cpp_style_unittest.py b/WebKitTools/Scripts/modules/cpp_style_unittest.py
index 7cddde0..75dd47e 100644
--- a/WebKitTools/Scripts/modules/cpp_style_unittest.py
+++ b/WebKitTools/Scripts/modules/cpp_style_unittest.py
@@ -1118,6 +1118,12 @@ class CppStyleTest(CppStyleTestBase):
'if (condition) {',
'')
self.assert_multi_line_lint(
+ ' MACRO1(macroArg) {',
+ '')
+ self.assert_multi_line_lint(
+ 'ACCESSOR_GETTER(MessageEventPorts) {',
+ 'Place brace on its own line for function definitions. [whitespace/braces] [4]')
+ self.assert_multi_line_lint(
'int foo() {',
'Place brace on its own line for function definitions. [whitespace/braces] [4]')
self.assert_multi_line_lint(
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list