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

cjerdonek at webkit.org cjerdonek at webkit.org
Thu Apr 8 02:03:45 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit c233422d25539164f87e9d1e1e0999fdfbdd72c1
Author: cjerdonek at webkit.org <cjerdonek at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Mar 1 05:14:03 2010 +0000

    Exempted WebKitTools/Scripts/webkitpy/thirdparty from all
    style checks except for the whitespace/carriage_return check
    and the pep8 tab and trailing white space checks.
    
    Reviewed by Shinichiro Hamaji.
    
    https://bugs.webkit.org/show_bug.cgi?id=35497
    
    * Scripts/webkitpy/style/checker.py:
      - Adjusted the _PATH_RULES_SPECIFIER configuration as necessary.
      - Added enough pep8 categories to _all_categories() for the
        unit tests to pass.
    
    * Scripts/webkitpy/style/checker_unittest.py:
      - Updated the test_path_rules_specifier() unit test.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55360 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index de8c3c5..6482c18 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2010-02-28  Chris Jerdonek  <cjerdonek at webkit.org>
+
+        Reviewed by Shinichiro Hamaji.
+
+        Exempted WebKitTools/Scripts/webkitpy/thirdparty from all
+        style checks except for the whitespace/carriage_return check
+        and the pep8 tab and trailing white space checks.
+
+        https://bugs.webkit.org/show_bug.cgi?id=35497
+
+        * Scripts/webkitpy/style/checker.py:
+          - Adjusted the _PATH_RULES_SPECIFIER configuration as necessary.
+          - Added enough pep8 categories to _all_categories() for the
+            unit tests to pass.
+
+        * Scripts/webkitpy/style/checker_unittest.py:
+          - Updated the test_path_rules_specifier() unit test.
+
 2010-02-27  Chris Jerdonek  <cjerdonek at webkit.org>
 
         Reviewed by David Levin.
diff --git a/WebKitTools/Scripts/webkitpy/style/checker.py b/WebKitTools/Scripts/webkitpy/style/checker.py
index fe65f74..b1be1ef 100644
--- a/WebKitTools/Scripts/webkitpy/style/checker.py
+++ b/WebKitTools/Scripts/webkitpy/style/checker.py
@@ -130,6 +130,18 @@ _PATH_RULES_SPECIFIER = [
       # exceptional header guards (e.g., WebCore_FWD_Debugger_h).
       "/ForwardingHeaders/"],
      ["-build/header_guard"]),
+
+    # For third-party Python code, keep only the following checks--
+    #
+    #   No tabs: to avoid having to set the SVN allow-tabs property.
+    #   No trailing white space: since this is easy to correct.
+    #   No carriage-return line endings: since this is easy to correct.
+    #
+    (["webkitpy/thirdparty/"],
+     ["-",
+      "+pep8/W191",  # Tabs
+      "+pep8/W291",  # Trailing white space
+      "+whitespace/carriage_return"]),
 ]
 
 
@@ -167,7 +179,16 @@ _MAX_REPORTS_PER_CATEGORY = {
 def _all_categories():
     """Return the set of all categories used by check-webkit-style."""
     # Take the union across all processors.
-    return CommonCategories.union(CppProcessor.categories)
+    categories = CommonCategories.union(CppProcessor.categories)
+
+    # FIXME: Consider adding all of the pep8 categories.  Since they
+    #        are not too meaningful for documentation purposes, for
+    #        now we add only the categories needed for the unit tests
+    #        (which validate the consistency of the configuration
+    #        settings against the known categories, etc).
+    categories = categories.union(["pep8/W191", "pep8/W291"])
+
+    return categories
 
 
 def _check_webkit_style_defaults():
diff --git a/WebKitTools/Scripts/webkitpy/style/checker_unittest.py b/WebKitTools/Scripts/webkitpy/style/checker_unittest.py
index ba82670..b039570 100755
--- a/WebKitTools/Scripts/webkitpy/style/checker_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/style/checker_unittest.py
@@ -140,6 +140,14 @@ class GlobalVariablesTest(unittest.TestCase):
         assertNoCheck("WebCore/ForwardingHeaders/debugger/Debugger.h",
                       "build/header_guard")
 
+        # Third-party Python code: webkitpy/thirdparty
+        path = "WebKitTools/Scripts/webkitpy/thirdparty/mock.py"
+        assertNoCheck(path, "build/include")
+        assertNoCheck(path, "pep8/E401")  # A random pep8 category.
+        assertCheck(path, "pep8/W191")
+        assertCheck(path, "pep8/W291")
+        assertCheck(path, "whitespace/carriage_return")
+
     def test_max_reports_per_category(self):
         """Check that _MAX_REPORTS_PER_CATEGORY is valid."""
         all_categories = self._all_categories()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list