Bug 49427

Summary: check-webkit-style function detection doesn't handle templates with spaces.
Product: WebKit Reporter: David Levin <levin>
Component: Tools / TestsAssignee: 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 Flags
Patch hamaji: review+, levin: commit-queue-

David Levin
Reported 2010-11-11 22:52:10 PST
See summary.
Attachments
Patch (4.92 KB, patch)
2010-11-11 22:58 PST, David Levin
hamaji: review+
levin: commit-queue-
David Levin
Comment 1 2010-11-11 22:58:16 PST
Shinichiro Hamaji
Comment 2 2010-11-11 23:07:43 PST
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?
David Levin
Comment 3 2010-11-11 23:26:11 PST
Comment on attachment 73702 [details] Patch I'll change the test and commit.
David Levin
Comment 4 2010-11-11 23:33:40 PST
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).
Shinichiro Hamaji
Comment 5 2010-11-11 23:38:56 PST
(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!
David Levin
Comment 6 2010-11-11 23:40:18 PST
Note You need to log in before you can comment on or make changes to this bug.