[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
mrobinson at webkit.org
mrobinson at webkit.org
Fri Jan 21 14:48:46 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit c6eca3b6a427343dbea5dc9037abc55c553d4711
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 30 21:46:09 2010 +0000
2010-12-30 Martin Robinson <mrobinson at igalia.com>
Reviewed by Darin Adler.
check-webkit-style should ignore NULL usage in calls to gtk_widget_style_get
https://bugs.webkit.org/show_bug.cgi?id=51758
Add a check-webkit-style exception for gtk_widget_style_get and NULL usage.
* Scripts/webkitpy/style/checkers/cpp.py: Add the exception.
* Scripts/webkitpy/style/checkers/cpp_unittest.py: Add some tests for this.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 86a3559..b9c8313 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-30 Martin Robinson <mrobinson at igalia.com>
+
+ Reviewed by Darin Adler.
+
+ check-webkit-style should ignore NULL usage in calls to gtk_widget_style_get
+ https://bugs.webkit.org/show_bug.cgi?id=51758
+
+ Add a check-webkit-style exception for gtk_widget_style_get and NULL usage.
+
+ * Scripts/webkitpy/style/checkers/cpp.py: Add the exception.
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py: Add some tests for this.
+
2010-12-29 Patrick Gansterer <paroga at webkit.org>
Unreviewed WinCE buildfix.
diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp.py b/Tools/Scripts/webkitpy/style/checkers/cpp.py
index 902a0a1..58c13df 100644
--- a/Tools/Scripts/webkitpy/style/checkers/cpp.py
+++ b/Tools/Scripts/webkitpy/style/checkers/cpp.py
@@ -2283,6 +2283,10 @@ def check_for_null(clean_lines, line_number, file_state, error):
if search(r'\bgdk_pixbuf_save_to\w+\b', line):
return
+ # Don't warn about NULL usage in gtk_widget_style_get(). See Bug 51758.
+ if search(r'\bgtk_widget_style_get\(\w+\b', line):
+ return
+
if search(r'\bNULL\b', line):
error(line_number, 'readability/null', 5, 'Use 0 instead of NULL.')
return
diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
index 8ee73fe..5746ef3 100644
--- a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
@@ -3858,6 +3858,17 @@ class WebKitStyleTest(CppStyleTestBase):
self.assert_lint(
'gchar* result = gdk_pixbuf_save_to_stream(pixbuf, function, data, type, error, NULL);',
'')
+ self.assert_lint(
+ 'gtk_widget_style_get(style, "propertyName", &value, "otherName", &otherValue, NULL);',
+ '')
+ self.assert_lint(
+ 'gtk_widget_style_get_property(style, NULL, NULL);',
+ 'Use 0 instead of NULL. [readability/null] [5]',
+ 'foo.cpp')
+ self.assert_lint(
+ 'gtk_widget_style_get_valist(style, NULL, NULL);',
+ 'Use 0 instead of NULL. [readability/null] [5]',
+ 'foo.cpp')
# 2. C++ and C bool values should be written as true and
# false. Objective-C BOOL values should be written as YES and NO.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list