<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">As an extra data point I want to tell that even with an automated formatter the indented leading whitespace does help. If you re-indent a block of code and leading whitespace is preserved, then you get a single chunk in the blame of the file. If you eat the leading whitespace then you have a million little pieces in the blame and it’s less clear just what happened. Something like<div class=""><br class=""></div><div class=""><div class=""><div class="">1111bc501498 (John Doe      2015-05-12 09:23:57 +0000  178) if (something) {</div><div class="">1111bc501498 (John Doe      2015-05-12 09:23:57 +0000  179)   // do something</div><div class="">2222c3ae83d8 (Adam Smith    2014-12-10 19:00:42 +0000  180)</div><div class="">1111bc501498 (John Doe      2015-05-12 09:23:57 +0000  181)   // do some more stuff</div><div class="">1111bc501498 (John Doe      2015-05-12 09:23:57 +0000  182) }</div></div><div class=""><br class=""></div><div class="">If leading whitespace was preserved after reindentation you would get a single blame chunk. The same applies to diff. Empty lines can make chunks too granular.</div><div class=""><br class=""></div><div class="">As for requirement</div><div class=""><blockquote type="cite" class="">be used in a project of significant size</blockquote><div class=""><br class=""></div>I want to point out that preserving leading whitespace on whitespace-only lines is Xcode default setting. And as the result many projects can end up using this style. For example, a quick check of <a href="https://github.com/search?l=objective-c&o=desc&q=stars:%3E1&s=stars&type=Repositories" class="">the top 5 Objective-C repositories with the most stars on GitHub</a> shows that 3 out of 5 are using predominantly this style (rs/SDWebImage, BradLarson/GPUImage, SnapKit/Masonry). It isn’t representative in any way, I just want to show that such style isn’t that obscure.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Volodymyr</div><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 13, 2017, at 05:19, Daniel Jasper via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Generally, see here:<div class=""><a href="https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options" target="_blank" class="cremed">https://clang.llvm.org/docs/<wbr class="">ClangFormatStyleOptions.html#<wbr class="">adding-additional-style-<wbr class="">options</a><br class=""></div><div class=""><br class=""></div><div class="">I vaguely remember this question being brought up before and I think we decided against it.</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Nov 13, 2017 at 2:14 PM, Manuel Klimek via cfe-dev <span dir="ltr" class=""><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_quote"><span class=""><div dir="ltr" class="">On Sat, Nov 11, 2017 at 7:20 AM Samuel Williams via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">I am interested in contributing to clang-format, to add an option to preserve and correct leading indentation.<div class=""><br class=""></div><div class="">Right now if you write code such as:</div><div class=""><br class=""></div><div class="">{</div><div class="">....int x = 10;</div><div class="">....</div><div class="">....return x;</div><div class="">}</div><div class=""><br class=""></div><div class="">The line in the middle will be truncated and there is no option to control it.</div><div class=""><br class=""></div><div class="">Some code prefers to have indented leading whitespace, indented to the same level as the previous line.</div><div class=""><br class=""></div><div class="">Would such a contribution be accepted and is anyone willing to help me through the process where necessary?</div></div></blockquote><div class=""><br class=""></div></span><div class="">The current reasoning is that with an automated formatter the indented leading whitespace doesn't help any more.</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Thanks</div><div class="">Samuel</div></div>
______________________________<wbr class="">_________________<br class="">
cfe-dev mailing list<br class="">
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/cfe-dev</a><br class="">
</blockquote></div></div>
<br class="">______________________________<wbr class="">_________________<br class="">
cfe-dev mailing list<br class="">
<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/cfe-dev</a><br class="">
<br class=""></blockquote></div><br class=""></div>
_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<br class=""></div></blockquote></div><br class=""></div></body></html>