Bug 171506

Summary: fix check-webkit-style errors in webkitpy about not having two spaces before inline comment
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Aakash Jain <aakash_jain>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, buildbot, commit-queue, dbates, dewei_zhu, glenn, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=66719
Attachments:
Description Flags
Proposed patch
none
Updated patch none

Description Aakash Jain 2017-05-01 12:29:33 PDT
check-webkit-style emits errors in few files in webkitpy about not having two spaces before inline comment. We should fix these.

e.g.:

ERROR: Tools/Scripts/webkitpy/style/checker.py:143:  at least two spaces before inline comment  [pep8/E261] [5]
ERROR: Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:2826:  at least two spaces before inline comment  [pep8/E261] [5]
Comment 1 Aakash Jain 2017-05-01 12:38:40 PDT
Created attachment 308749 [details]
Proposed patch
Comment 2 Build Bot 2017-05-01 12:40:51 PDT
Attachment 308749 [details] did not pass style-queue:


ERROR: Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py:419:  [SCMTest._shared_test_reverse_diff] Instance of 'SCMTest' has no 'scm' member  [pylint/E1101] [5]
ERROR: Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py:706:  [SVNTest.test_create_patch_is_full_patch] Instance of 'SVNTest' has no 'svn_checkout_path' member  [pylint/E1101] [5]
Total errors found: 2 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alexey Proskuryakov 2017-05-01 12:47:18 PDT
Comment on attachment 308749 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=308749&action=review

Do we actually want this rule? It contradicts Webkit style <https://webkit.org/code-style-guidelines/#comments>.

> Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py:419
> +        self._setup_webkittools_scripts_symlink(self.scm)  # Git's apply_reverse_diff uses resolve-ChangeLogs

It may be good to take this opportunity to add periods in the end of sentences.
Comment 4 Aakash Jain 2017-05-01 13:38:56 PDT
(In reply to Alexey Proskuryakov from comment #3)
> Do we actually want this rule? It contradicts Webkit style <https://webkit.org/code-style-guidelines/#comments>.

Should we modify the check-webkit-style script then?
Comment 5 Alexey Proskuryakov 2017-10-25 11:29:12 PDT
Seems worth discussing it on webkit-dev.
Comment 6 Aakash Jain 2017-11-02 17:41:59 PDT
Created attachment 325805 [details]
Updated patch

Following PEP8 guidelines https://www.python.org/dev/peps/pep-0008/#inline-comments
Comment 7 Build Bot 2017-11-02 17:45:00 PDT
Attachment 325805 [details] did not pass style-queue:


ERROR: Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py:419:  [SCMTest._shared_test_reverse_diff] Instance of 'SCMTest' has no 'scm' member  [pylint/E1101] [5]
ERROR: Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py:706:  [SVNTest.test_create_patch_is_full_patch] Instance of 'SVNTest' has no 'svn_checkout_path' member  [pylint/E1101] [5]
Total errors found: 2 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 WebKit Commit Bot 2017-11-07 14:33:45 PST
Comment on attachment 325805 [details]
Updated patch

Clearing flags on attachment: 325805

Committed r224548: <https://trac.webkit.org/changeset/224548>
Comment 9 WebKit Commit Bot 2017-11-07 14:33:46 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2017-11-15 13:12:11 PST
<rdar://problem/35568992>