<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Aug 15, 2016 at 2:36 AM, Pavel Labath via lldb-dev <span dir="ltr"><<a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="gmail-cremed cremed">lldb-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I've sampled the python code from the llvm repository, and it seems to<br>
be using a mixture of 4-, 2-, and even 8- character indent, with 4<br>
being the most prevalent. So, I think we can safely stay with status<br>
quo.<br>
<br></blockquote><div><br></div><div>(Comment from the peanut gallery...)</div><div><br></div><div>Python does have a language-level style guide (PEP-8):</div><div><br></div><div><a href="https://www.python.org/dev/peps/pep-0008/">https://www.python.org/dev/peps/pep-0008/</a><br></div><div><br></div><div>If code is going to be reformatted, then it may be best to try to converge on exactly the PEP-8 style. Speaking as a project "outsider" (i.e., not an active contributor), but someone with Python background, anything that diverges from standard Python style seems jarring (at least to me).</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
It will take some editor tweaking to make it use the correct indent<br>
for different files, but it should be manageable.<br>
<br>
pl<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
On 12 August 2016 at 18:13, Jim Ingham <<a href="mailto:jingham@apple.com" class="gmail-cremed cremed">jingham@apple.com</a>> wrote:<br>
><br>
>> On Aug 12, 2016, at 5:23 AM, Pavel Labath via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="gmail-cremed cremed">lldb-dev@lists.llvm.org</a>> wrote:<br>
>><br>
>> On 12 August 2016 at 00:54, Chris Lattner via lldb-dev<br>
>> <<a href="mailto:lldb-dev@lists.llvm.org" class="gmail-cremed cremed">lldb-dev@lists.llvm.org</a>> wrote:<br>
>>> I recommend approaching this in three steps:<br>
>>><br>
>>> 1) get the less-controversial changes done that Greg was outlining.<br>
>>> 2) start a discussion in the llvm community about the concept of a<br>
>>> member/global prefix.<br>
>>> 2a) the community could agree that llvm-as-a-whole should move to prefixes<br>
>>> or otherwise change the camel case policy.<br>
>>> 2b) the community could agree that the existing policies are preferred<br>
>>> 3) LLDB moves to whatever is the end result of the discussion.<br>
>>><br>
>>> I guess what I’m saying is that since the opinions about this are very<br>
>>> strong, and because we haven’t really had that debate in the LLVM community,<br>
>>> that it would be bad to proactively move to the LLVM style, simply to have<br>
>>> to move back later. Iff the (sure to be extensive) community discussion<br>
>>> settles on the idea that prefixes are the wrong thing, then LLDB should<br>
>>> remove them to be consistent.<br>
>>><br>
>>> -Chris<br>
>><br>
>> +1<br>
>><br>
>><br>
>><br>
>> In terms of the formatting of tests, I did some more research on this.<br>
>> I think the changes needed to be made to the test suite are generally<br>
>> trivial to fix (e.g. r278490), but I don't think we can avoid a manual<br>
>> intervention. CommentPragmas does not seem to be a silver bullet -- it<br>
>> does prevent clang-format from breaking the comment, but it does not<br>
>> prevent it from moving the whole comment to a new line. That said,<br>
>> when I reformatted the test sources with CommentPragmas set, the<br>
>> number of failures went down to 80 (from about 150)...<br>
>><br>
>> I believe we should still perform the reformatting of the tests, at<br>
>> least to standardize on the 2 space indent (in fact we should consider<br>
>> doing the same for the python code as well, I don't know what's the<br>
>> situation there in llvm land), but it can be done later. It will make<br>
>> the period while the code is in flux longer, but hopefully not too<br>
>> long. Also the modifications will be independent of the main reformat,<br>
>> so it will still be true that a single source file only got<br>
>> reformatted once.<br>
>><br>
><br>
> My eyes put in a vote for not reformatting the Python to 2 space tabs. In C++, most IDE's do smart things with double-clicking on { to find the closing ones easing the task that two space indents makes somewhat harder. But since the spacing is the only nesting indicator in Python, it would be nice to keep that more visually apparent.<br>
><br>
>> pl<br>
>> ______________________________<wbr>_________________<br>
>> lldb-dev mailing list<br>
>> <a href="mailto:lldb-dev@lists.llvm.org" class="gmail-cremed cremed">lldb-dev@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank" class="gmail-cremed cremed">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/lldb-dev</a><br>
><br>
______________________________<wbr>_________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" class="gmail-cremed cremed">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank" class="gmail-cremed cremed">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/lldb-dev</a><br>
</div></div></blockquote></div><br></div></div>