RESOLVED FIXED 155273
check-webkit-style: fix false-positive warnings about @try/@catch blocks in Objective-C++ source files
https://bugs.webkit.org/show_bug.cgi?id=155273
Summary check-webkit-style: fix false-positive warnings about @try/@catch blocks in O...
David Kilzer (:ddkilzer)
Reported 2016-03-09 15:50:29 PST
The check-webkit-style script emits false-positive warnings about @try/@catch blocks in Objective-C++ source files. See Bug 155258 Comment #3. <https://bugs.webkit.org/show_bug.cgi?id=155258#c3>
Attachments
Patch (3.05 KB, patch)
2016-03-09 15:55 PST, David Kilzer (:ddkilzer)
no flags
Patch v2 (3.06 KB, patch)
2016-03-09 16:00 PST, David Kilzer (:ddkilzer)
no flags
David Kilzer (:ddkilzer)
Comment 1 2016-03-09 15:55:24 PST
David Kilzer (:ddkilzer)
Comment 2 2016-03-09 15:56:29 PST
Comment on attachment 273497 [details] Patch Oops, I see a problem with one of the regexes.
David Kilzer (:ddkilzer)
Comment 3 2016-03-09 16:00:25 PST
Created attachment 273500 [details] Patch v2
WebKit Commit Bot
Comment 4 2016-03-09 17:53:31 PST
Comment on attachment 273500 [details] Patch v2 Clearing flags on attachment: 273500 Committed r197912: <http://trac.webkit.org/changeset/197912>
WebKit Commit Bot
Comment 5 2016-03-09 17:53:35 PST
All reviewed patches have been landed. Closing bug.
David Kilzer (:ddkilzer)
Comment 6 2016-03-10 17:28:37 PST
Comment on attachment 273500 [details] Patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=273500&action=review > Tools/Scripts/webkitpy/style/checkers/cpp.py:2429 > - and not search(r'\b(if|for|while|switch|NS_ENUM)\b', line) > + and not search(r'(\b(if|for|while|switch|NS_ENUM)|} @catch)\b', line) For posterity r'(\b(if|for|while|switch|NS_ENUM|@catch)\b' doesn't work because the pattern '\b@catch\b' doesn't match '} @catch (NSException *exception){\n', presumably since '@' is not considered the start of a word.
Note You need to log in before you can comment on or make changes to this bug.