<div dir="ltr"><div>In general, sounds okay to me, but one slight concern I have is that there are some areas of code I've seen which are deliberately unformatted for various reasons, quite often because the code looks much nicer in its current state or similar. This of course might just mean a clang-format bug fix/small behaviour adjustment etc is needed, or "do not format" markers needs adding. However, short of an audit of every file that might be affected by this, it's hard to know when something might be affected undesirably, so I'd be marginally against it being an automated approach without some kind of manual reading of the changes involved.</div><div><br></div><div>James<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 29 Jun 2020 at 21:33, MyDeveloper Day via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p style="margin-top:0px;font-family:Helvetica,Arial,sans-serif;font-size:15.008px">(Copying from Discourse)</p><p style="margin-top:0px;font-family:Helvetica,Arial,sans-serif;font-size:15.008px">All</p><p style="font-family:Helvetica,Arial,sans-serif;font-size:15.008px">A couple of months ago I added the following page documentation <a href="http://clang.llvm.org/docs/ClangFormattedStatus.html" rel="nofollow noopener" style="background:transparent none repeat scroll 0% 0%;color:rgb(0,136,204);text-decoration-line:none" target="_blank">Clang-Formatted-Status</a> to track the status of “How Much” clang-formatted the </p><p style="font-family:Helvetica,Arial,sans-serif;font-size:15.008px">LLVM/Clang project is.</p><p style="font-family:Helvetica,Arial,sans-serif;font-size:15.008px">I’m a contributor to clang-format and would like to see LLVM 100% clang formatted so we can use LLVM as a massive test-suite for clang-format when we make changes.</p><p style="font-family:Helvetica,Arial,sans-serif;font-size:15.008px">In the last couple of months since we added this page the % has gone up by ~4% and this is likely in most part of either: a mention in LLVM-Weekly, the premerge checks or perhaps some recent clang-format efforts by individuals. This is fantastic and every directory that gets to 100% increase the directories that I can run against to check against.</p><p style="font-family:Helvetica,Arial,sans-serif;font-size:15.008px">However, it recently twigged to me that files that don’t change very often are never going to be 100% clang-formatted simply by virtue of clang-formatting all new changes.</p><p style="font-family:Helvetica,Arial,sans-serif;font-size:15.008px">So I 100% understand this kind of topic comes up from time to time and I understand that we don’t want to automatically clang-format the entire tree as this can disrupt peoples downstream forks, especially where they actively have code inflight.</p><p style="font-family:Helvetica,Arial,sans-serif;font-size:15.008px">But I wonder if we could have a general rule that said a [NFC] clang-format change could be made on ANY file that had NOT been changed in a 6/12 months period? I believe this process could be automated at least in a semi-automatic way. Once complete the pre-merge checks should maintain the current status.</p><p style="font-family:Helvetica,Arial,sans-serif;font-size:15.008px">This would drive the goal of completely clang-formatted source tree, without the disruption to current active areas.</p><p style="font-family:Helvetica,Arial,sans-serif;font-size:15.008px">Any thoughts?</p><p style="font-family:Helvetica,Arial,sans-serif;font-size:15.008px">MyDeveloperDay</p></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>