fix check-webkit-style errors in webkitpy about not having two spaces before inline...
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Nov 2017 22:33:41 +0000 (22:33 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Nov 2017 22:33:41 +0000 (22:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=171506

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
(SCMTest._shared_test_reverse_diff): Added two spaces before inline comment.
(test_create_patch_is_full_patch): Ditto.
* Scripts/webkitpy/common/thread/messagepump.py:
(MessagePump): Ditto.
* Scripts/webkitpy/layout_tests/servers/http_server.py:
(Lighttpd._prepare_config): Ditto.
* Scripts/webkitpy/style/checker.py: Ditto.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(OrderOfIncludesTest.test_check_preprocessor_in_include_section): Ditto.

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

Tools/ChangeLog
Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
Tools/Scripts/webkitpy/common/thread/messagepump.py
Tools/Scripts/webkitpy/layout_tests/servers/http_server.py
Tools/Scripts/webkitpy/style/checker.py
Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py

index 3eaa0df..5468724 100644 (file)
@@ -1,5 +1,23 @@
 2017-11-07  Aakash Jain  <aakash_jain@apple.com>
 
+        fix check-webkit-style errors in webkitpy about not having two spaces before inline comment
+        https://bugs.webkit.org/show_bug.cgi?id=171506
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+        (SCMTest._shared_test_reverse_diff): Added two spaces before inline comment.
+        (test_create_patch_is_full_patch): Ditto.
+        * Scripts/webkitpy/common/thread/messagepump.py:
+        (MessagePump): Ditto.
+        * Scripts/webkitpy/layout_tests/servers/http_server.py:
+        (Lighttpd._prepare_config): Ditto.
+        * Scripts/webkitpy/style/checker.py: Ditto.
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+        (OrderOfIncludesTest.test_check_preprocessor_in_include_section): Ditto.
+
+2017-11-07  Aakash Jain  <aakash_jain@apple.com>
+
         Add support for webkitpy tests EWS
         https://bugs.webkit.org/show_bug.cgi?id=178480
 
index c993c7f..0a1299e 100644 (file)
@@ -416,7 +416,7 @@ class SCMTest(unittest.TestCase):
         self.assertEqual(self.scm.committer_email_for_revision(3), getpass.getuser())  # Committer "email" will be the current user
 
     def _shared_test_reverse_diff(self):
-        self._setup_webkittools_scripts_symlink(self.scm) # Git's apply_reverse_diff uses resolve-ChangeLogs
+        self._setup_webkittools_scripts_symlink(self.scm)  # Git's apply_reverse_diff uses resolve-ChangeLogs.
         # Only test the simple case, as any other will end up with conflict markers.
         self.scm.apply_reverse_diff('5')
         self.assertEqual(read_from_path('test_file'), "test1test2test3\n")
@@ -703,7 +703,7 @@ class SVNTest(SCMTest):
         # Change into our test directory and run the create_patch command.
         os.chdir(test_dir_path)
         scm = detect_scm_system(test_dir_path)
-        self.assertEqual(scm.checkout_root, self.svn_checkout_path) # Sanity check that detection worked right.
+        self.assertEqual(scm.checkout_root, self.svn_checkout_path)  # Sanity check that detection worked right.
         actual_patch_contents = scm.create_patch()
         expected_patch_contents = """Index: test_dir2/test_file2
 ===================================================================
index 7958f1a..985a361 100644 (file)
@@ -39,7 +39,7 @@ class MessagePumpDelegate(object):
 
 
 class MessagePump(object):
-    interval = 10 # seconds
+    interval = 10  # seconds.
 
     def __init__(self, delegate, message_queue):
         self._delegate = delegate
index e6fa940..4ea6384 100644 (file)
@@ -172,8 +172,7 @@ class Lighttpd(http_server_base.HttpServerBase):
                      '-m', module_path]
 
         if not self._run_background:
-            start_cmd.append(# Don't background
-                             '-D')
+            start_cmd.append('-D')  # Don't background.
 
         # Copy liblightcomp.dylib to /tmp/lighttpd/lib to work around the
         # bug that mod_alias.so loads it from the hard coded path.
index ca8f0fe..8e0cc18 100644 (file)
@@ -142,13 +142,14 @@ _PATH_RULES_SPECIFIER = [
       os.path.join('Tools', 'DumpRenderTree', 'TestNetscapePlugIn')],
      ["-build/include",
       "-readability/naming"]),
-    ([# There is no clean way to avoid "yy_*" names used by flex.
+    ([  # There is no clean way to avoid "yy_*" names used by flex.
       os.path.join('Source', 'WebCore', 'css', 'CSSParser.cpp'),
       # TestWebKitAPI uses funny macros like EXPECT_WK_STREQ.
       os.path.join('Tools', 'TestWebKitAPI')],
      ["-readability/naming"]),
 
-    ([# The GTK+ and WPE APIs use upper case, underscore separated, words in
+    ([
+      # The GTK+ and WPE APIs use upper case, underscore separated, words in
       # certain types of enums (e.g. signals, properties).
       os.path.join('Source', 'WebKit', 'Shared', 'API', 'glib'),
       os.path.join('Source', 'WebKit', 'UIProcess', 'API', 'glib'),
@@ -159,31 +160,35 @@ _PATH_RULES_SPECIFIER = [
       os.path.join('Source', 'WebKit', 'WebProcess', 'InjectedBundle', 'API', 'wpe')],
      ["-readability/enum_casing"]),
 
-    ([# To use GStreamer GL without conflicts of GL symbols,
+    ([
+      # To use GStreamer GL without conflicts of GL symbols,
       # we should include gst/gl/gl.h before including OpenGL[ES]Shims
       os.path.join('Source', 'WebCore', 'platform', 'graphics', 'gstreamer', 'MediaPlayerPrivateGStreamerBase.cpp')],
      ["-build/include_order"]),
 
-    ([# Header files in ForwardingHeaders have no header guards or
+    ([
+      # Header files in ForwardingHeaders have no header guards or
       # exceptional header guards (e.g., WebCore_FWD_Debugger_h).
       os.path.join(os.path.sep, 'ForwardingHeaders')],
      ["-build/header_guard"]),
-    ([# assembler has lots of opcodes that use underscores, so
+    ([
+      # Assembler has lots of opcodes that use underscores, so
       # we don't check for underscores in that directory.
       os.path.join('Source', 'JavaScriptCore', 'assembler'),
       os.path.join('Source', 'JavaScriptCore', 'jit', 'JIT')],
      ["-readability/naming/underscores"]),
-    ([# JITStubs has an usual syntax which causes false alarms for a few checks.
+    ([  # JITStubs has an usual syntax which causes false alarms for a few checks.
       os.path.join('JavaScriptCore', 'jit', 'JITStubs.cpp')],
      ["-readability/parameter_name",
       "-whitespace/parens"]),
 
     # WebKit rules:
     # WebKit and certain directories have idiosyncracies.
-    ([# NPAPI has function names with underscores.
+    ([  # NPAPI has function names with underscores.
       os.path.join('Source', 'WebKit', 'WebProcess', 'Plugins', 'Netscape')],
      ["-readability/naming"]),
-    ([# The WebKit C API has names with underscores and whitespace-aligned
+    ([
+      # The WebKit C API has names with underscores and whitespace-aligned
       # struct members. Also, we allow unnecessary parameter names in
       # WebKit APIs because we're matching CF's header style.
       # Additionally, we use word which starts with non-capital letter 'k'
@@ -195,7 +200,8 @@ _PATH_RULES_SPECIFIER = [
       "-readability/naming",
       "-readability/parameter_name",
       "-whitespace/declaration"]),
-    ([# These files define GObjects, which implies some definitions of
+    ([
+      # These files define GObjects, which implies some definitions of
       # variables and functions containing underscores.
       os.path.join('Source', 'WebCore', 'platform', 'graphics', 'gstreamer', 'VideoSinkGStreamer.cpp'),
       os.path.join('Source', 'WebCore', 'platform', 'graphics', 'gstreamer', 'WebKitWebSourceGStreamer.cpp'),
@@ -220,31 +226,33 @@ _PATH_RULES_SPECIFIER = [
       "+pep8/W291",  # Trailing white space
       "+whitespace/carriage_return"]),
 
-    ([# Source/JavaScriptCore/disassembler/udis86/ is generated code.
+    ([  # Source/JavaScriptCore/disassembler/udis86/ is generated code.
       os.path.join('Source', 'JavaScriptCore', 'disassembler', 'udis86')],
      ["-readability/naming/underscores",
       "-whitespace/declaration",
       "-whitespace/indent"]),
 
-    ([# There is no way to avoid the symbols __jit_debug_register_code
+    ([
+      # There is no way to avoid the symbols __jit_debug_register_code
       # and __jit_debug_descriptor when integrating with gdb.
       os.path.join('Source', 'JavaScriptCore', 'jit', 'GDBInterface.cpp')],
      ["-readability/naming"]),
 
-    ([# On some systems the trailing CR is causing parser failure.
+    ([  # On some systems the trailing CR is causing parser failure.
       os.path.join('Source', 'JavaScriptCore', 'parser', 'Keywords.table')],
      ["+whitespace/carriage_return"]),
 
-    ([# DataDetectorsCoreSPI.h declares enum bitfields as CFIndex.
+    ([  # DataDetectorsCoreSPI.h declares enum bitfields as CFIndex.
       os.path.join('Source', 'WebCore', 'PAL', 'pal', 'spi', 'cocoa', 'DataDetectorsCoreSPI.h')],
      ["-runtime/enum_bitfields"]),
 
-    ([# PassKitSPI.h imports "PassKit.h" at two lines depending on the build configuration,
+    ([
+      # PassKitSPI.h imports "PassKit.h" at two lines depending on the build configuration,
       # which causes a false positive error.
       os.path.join('Source', 'WebCore', 'PAL', 'pal', 'spi', 'cocoa', 'PassKitSPI.h')],
      ["-build/include"]),
 
-    ([# Some SPI headers have identifier names with underscores.
+    ([  # Some SPI headers have identifier names with underscores.
       os.path.join('Source', 'WebCore', 'PAL', 'pal', 'spi')],
      ["-readability/naming/underscores"]),
 ]
index 0d2d69b..270491c 100644 (file)
@@ -2878,7 +2878,7 @@ class OrderOfIncludesTest(CppStyleTestBase):
                                          '#else\n'
                                          '#include "foobar.h"\n'
                                          '#endif"\n'
-                                         '#include "bar.h"\n', # No flag because previous is in preprocessor section
+                                         '#include "bar.h"\n',  # No flag because previous is in preprocessor section.
                                          '')
 
         self.assert_language_rules_check('foo.cpp',
@@ -2889,7 +2889,7 @@ class OrderOfIncludesTest(CppStyleTestBase):
                                          '#include "baz.h"\n'
                                          '#endif"\n'
                                          '#include "bar.h"\n'
-                                         '#include "a.h"\n', # Should still flag this.
+                                         '#include "a.h"\n',  # Should still flag this.
                                          'Alphabetical sorting problem.  [build/include_order] [4]')
 
         self.assert_language_rules_check('foo.cpp',
@@ -2898,7 +2898,7 @@ class OrderOfIncludesTest(CppStyleTestBase):
                                          '\n'
                                          '#ifdef BAZ\n'
                                          '#include "baz.h"\n'
-                                         '#include "bar.h"\n' #Should still flag this
+                                         '#include "bar.h"\n'  # Should still flag this.
                                          '#endif"\n',
                                          'Alphabetical sorting problem.  [build/include_order] [4]')
 
@@ -2913,7 +2913,7 @@ class OrderOfIncludesTest(CppStyleTestBase):
                                          '#include "foobar.h"\n'
                                          '#endif"\n'
                                          '#include "bar.h"\n'
-                                         '#include "a.h"\n', # Should still flag this.
+                                         '#include "a.h"\n',  # Should still flag this.
                                          'Alphabetical sorting problem.  [build/include_order] [4]')
 
         # Check that after an already included error, the sorting rules still work.