Resolve multi-line conditional difference between check-webkit-style and git cl format |
||
Issue description
git cl format will format will make the following change:
if (blah)
return foo->bar->baz();
to
if (blah)
return foo->
bar->
baz();
Unfortunately we have a rule in check-webkit-style that disallows this:
** Presubmit ERRORS **
check-webkit-style failed
... A conditional or loop body must use braces if the statement is more than one line long. [whitespace/braces] [4]
Nico and Daniel, would you be okay with me turning off this check-webkit-style rule?
,
Oct 12 2016
Can't you just add braces when this happens? Is this very common? (But turning it off is fine with me too)
,
Oct 12 2016
Thanks for the info. I misunderstood and thought "git cl format" was doing the right thing here, and check-webkit-style was just out-of-date. Now that I see that the style guide does want braces, leaving this presubmit check on and fixing https://llvm.org/bugs/show_bug.cgi?id=26215 (eventually) seems like a better fix. |
||
►
Sign in to add a comment |
||
Comment 1 by dcheng@chromium.org
, Oct 12 2016