Style checker should not check public Qt WK2 API for parameter_name.
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Sep 2011 18:29:27 +0000 (18:29 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Sep 2011 18:29:27 +0000 (18:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68359

Reviewed by Andreas Kling.

The public Qt WK2 APIs have different rules than WebKit for parameters of methods in h files.
Add an exception in the style checker to disable the check. Also added the test for it.

* Scripts/webkitpy/style/checker.py:
* Scripts/webkitpy/style/checker_unittest.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95446 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/style/checker.py
Tools/Scripts/webkitpy/style/checker_unittest.py

index 541a2df..1799bbd 100644 (file)
@@ -1,3 +1,16 @@
+2011-09-19  Alexis Menard  <alexis.menard@openbossa.org>
+
+        Style checker should not check public Qt WK2 API for parameter_name.
+        https://bugs.webkit.org/show_bug.cgi?id=68359
+
+        Reviewed by Andreas Kling.
+
+        The public Qt WK2 APIs have different rules than WebKit for parameters of methods in h files.
+        Add an exception in the style checker to disable the check. Also added the test for it.
+
+        * Scripts/webkitpy/style/checker.py:
+        * Scripts/webkitpy/style/checker_unittest.py:
+
 2011-09-19  Leandro Pereira  <leandro@profusion.mobi>
 
         GTK DRT leaks memory while comparing history items
index 1b426b7..01dccac 100644 (file)
@@ -144,6 +144,12 @@ _PATH_RULES_SPECIFIER = [
      ([# Qt's MiniBrowser has no config.h
        "Tools/MiniBrowser/qt"],
       ["-build/include"]),
+
+    ([# The Qt APIs use Qt/QML naming style, which includes
+      # naming parameters in h files.
+      "Source/WebKit2/UIProcess/API/qt"],
+     ["-readability/parameter_name"]),
+
     ([# The GTK+ APIs use GTK+ naming style, which includes
       # lower-cased, underscore-separated values, whitespace before
       # parens for function calls, and always having variable names.
index 3e9d7ec..431dbb8 100755 (executable)
@@ -257,6 +257,9 @@ class GlobalVariablesTest(unittest.TestCase):
         assertNoCheck("Tools/MiniBrowser/qt/UrlLoader.cpp",
                     "build/include")
 
+        assertNoCheck("Source/WebKit2/UIProcess/API/qt",
+                    "readability/parameter_name")
+
         assertNoCheck("Source/WebCore/ForwardingHeaders/debugger/Debugger.h",
                       "build/header_guard")