Changeset 160124 in webkit
- Timestamp:
- Dec 4, 2013, 2:16:30 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/webkitpy/style/checkers/cpp.py (modified) (1 diff)
-
Scripts/webkitpy/style/checkers/cpp_unittest.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r160108 r160124 1 2013-12-04 Myles C. Maxfield <mmaxfield@apple.com> 2 3 check-webkit-style detected some ternary statements as initialization lists 4 https://bugs.webkit.org/show_bug.cgi?id=125246 5 6 Reviewed by Dean Jackson. 7 8 The regular expression that check-webkit-tests uses to detect initialization 9 lists was too broad, resulting in false positives. This patch makes the 10 regex more specific 11 12 * Scripts/webkitpy/style/checkers/cpp.py: 13 (check_member_initialization_list): 14 * Scripts/webkitpy/style/checkers/cpp_unittest.py: 15 (WebKitStyleTest.test_member_initialization_list): 16 1 17 2013-12-04 Mark Hahnenberg <mhahnenberg@apple.com> 2 18 -
trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py
r160086 r160124 1987 1987 # with the colon or comma preceding the member on that line. 1988 1988 begin_line = line 1989 if search(r' (?P<indentation>\s*)([^\s]\(.*\)\s?\:|^\s*\:).*[^;]*$', line):1989 if search(r'^(?P<indentation>\s*)((explicit\s+)?[^\s]+\(.*\)\s?\:|^\s*\:).*[^;]*$', line): 1990 1990 if search(r'[^:]\:[^\:\s]+', line): 1991 1991 error(line_number, 'whitespace/init', 4, -
trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
r160086 r160124 4915 4915 4916 4916 def test_member_initialization_list(self): 4917 self.assert_lint('explicit MyClass(Document* doc) : MySuperClass() { }', 4918 'Should be indented on a separate line, with the colon or comma first on that line.' 4919 ' [whitespace/indent] [4]') 4917 4920 self.assert_lint('MyClass::MyClass(Document* doc) : MySuperClass() { }', 4918 4921 'Should be indented on a separate line, with the colon or comma first on that line.' … … 4984 4987 };''', 4985 4988 '') 4989 self.assert_lint('o = foo(b ? bar() : baz());', '') 4986 4990 4987 4991 def test_other(self):
Note:
See TracChangeset
for help on using the changeset viewer.