Add a style guideline regarding spacing in range-based for loops
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Sep 2013 18:13:19 +0000 (18:13 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Sep 2013 18:13:19 +0000 (18:13 +0000)
commit28e0d603f17a7037099fe1469b5011c75176a64d
tree9802d0a5f96cacee6b041044797a69f244c367fc
parent0d7bebeb8114330dff7553a90bc00f1726e6451f
Add a style guideline regarding spacing in range-based for loops
https://bugs.webkit.org/show_bug.cgi?id=121620

Reviewed by Anders Carlsson.

Tools:

* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing): Added checking that there are spaces around the colon in a range-based for
loop.
(CppChecker): Added whitespace/colon to the categories set.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_spacing): Added two tests for the new check.

Websites/webkit.org:

* coding/coding-style.html: Added the guideline that spaces should be placed
around the colon in a range-based for loop.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/style/checkers/cpp.py
Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
Websites/webkit.org/ChangeLog
Websites/webkit.org/coding/coding-style.html