<div dir="ltr">Yes, we are aware. The check was implemented mostly for a clang-tidy tutorial. It could certainly use more love.<div><br></div><div>As for the clang-format issue, I have recently updated clang-format to support this case better in general (just removing or adding braces). Not sure whether clang-format-diff.py can make use of this yet.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 8, 2015 at 7:55 PM, Piotr Padlewski <span dir="ltr"><<a href="mailto:piotr.padlewski@gmail.com" target="_blank">piotr.padlewski@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi folks,<div>so recently I was testing clang-tidy, and I had a problem with the check readability-else-after-return:</div><div><br></div><div>1. running git-clang-format after applying transformation doesn't format everything, because this check only removes one line (+ braces), which doesn't affect other lines, which leeds to wrong identation.</div><div>2. It only transform one else at one time so for example for code like this:</div><div><div> </div><div>     if (multilevel && isMultilevelPolicyDescendable(policy, getDepth()))</div><div>     {</div><div>         return ..<br></div><div>     }</div><div>     else if (size() > 1) // it was only able to remove this one</div><div>     {</div><div>        return ...</div><div>     }</div><div>     else </div><div>    {</div><div>         if (policy.type == ClassificationType::EXTRA_PARAMS)</div><div>             return </div><div>         else</div><div>             return </div><div>    }</div><div><br></div></div><div><br></div><div>Did you know about those problems? I was talking with Nick (cc) and he was surprised that not all formatting can be done by just applying clang-format-diff.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Piotr</div></font></span></div>
</blockquote></div><br></div>