[webkit-reviews] review granted: [Bug 204142] check-webkit-style: fix false errors for obj-c method calls in range-based for statements using colon syntax : [Attachment 383429] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 13 07:31:34 PST 2019


Jonathan Bedard <jbedard at apple.com> has granted Megan Gardner
<megan_gardner at apple.com>'s request for review:
Bug 204142: check-webkit-style: fix false errors for obj-c method calls in
range-based for statements using colon syntax
https://bugs.webkit.org/show_bug.cgi?id=204142

Attachment 383429: Patch

https://bugs.webkit.org/attachment.cgi?id=383429&action=review




--- Comment #2 from Jonathan Bedard <jbedard at apple.com> ---
Comment on attachment 383429
  --> https://bugs.webkit.org/attachment.cgi?id=383429
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=383429&action=review

Small nit about combining the regex check into the existing if statement, but
other than that, it looks good!

> Tools/Scripts/webkitpy/style/checkers/cpp.py:1988
> +		   if not search(r'\[[^\]]+:[^\]]*\]', condition):

Seems like this should be on line 1987 with the rest of the if statement, so it
looks like:

if statement == 'for' and search(r'(?:[^ :]:[^:]|[^:]:[^ :])', condition) and
not search(r'\[[^\]]+:[^\]]*\]', condition):
    error(...)


More information about the webkit-reviews mailing list