Summary: | check-webkit-style function detection doesn't handle templates with spaces. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | David Levin <levin> | ||||
Component: | Tools / Tests | Assignee: | David Levin <levin> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | hamaji | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 49394 | ||||||
Attachments: |
|
Description
David Levin
2010-11-11 22:52:10 PST
Created attachment 73702 [details]
Patch
Comment on attachment 73702 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=73702&action=review > WebKitTools/Scripts/webkitpy/style/checkers/cpp_unittest.py:2452 > + ('my_namespace::my_other_namespace::MyVeryLongTypeName<Type1, Type5>*\n' As now we can handle something like MyVeryLongTypeName<Type1, Type5<Type6, Type7> > , it's worth having such test case? Comment on attachment 73702 [details]
Patch
I'll change the test and commit.
PS It found a bug. I had to change line_with_no_templates = iteratively_replace_matches_with_char(r'<[^>]*>', line, "_") to line_with_no_templates = iteratively_replace_matches_with_char(r'<[^<>]*>', line, "_") in order not cover two templates at once (like this "< < >" which is what it was doing before). (In reply to comment #4) > PS It found a bug. > > I had to change > line_with_no_templates = iteratively_replace_matches_with_char(r'<[^>]*>', line, "_") > to > line_with_no_templates = iteratively_replace_matches_with_char(r'<[^<>]*>', line, "_") > in order not cover two templates at once (like this "< < >" which is what it was doing before). Ah, nice catch! Committed as http://trac.webkit.org/changeset/71896 |