[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automated formatting
From: |
David Kastrup |
Subject: |
Re: automated formatting |
Date: |
Mon, 27 Jan 2020 13:43:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
David Kastrup <address@hidden> writes:
> Han-Wen Nienhuys <address@hidden> writes:
>
>> I want to propose to move to automated formatting for our C++ code.
>>
>> I put up a .clang-format code that mostly mimicks our style at
>>
>> https://codereview.appspot.com/561340043
>>
>> I have a lot of good experience with automating code formatting.. It
>> removes drudgery for code authors, obviates discussions over style in
>> code review, and generally elevates the level of discourse in our
>> reviews.
>>
>> What do you all think?
>
> scripts/auxiliar/fixcc.py and astyle 2.04 is what we standardized on.
>
>> The current config modifies about 11k lines, mostly because of
>> different line breaks (necessary to keep the 80 column limit.)
>
> Any particular reason to change the automated style to a different one?
> Clang is a pretty big dependency for developers.
I just put up an issue that makes the --sloppy option of fixcc.py work
(but updating to 3.04 does not seem like much of an issue either)
>> Obviously, reformatting code makes patches harder to transport, so
>> we'd have to do it on all active branches at the same time.
That's why I think changing the existing automated formatting style is
an unwanted complication.
In Graham's reign, rerunning the C++ formatter was a pretty frequent
occurence, I think it was more than once yearly. We also have a Scheme
code formatter that relies on Emacs to do the hard work.
Frankly, I just forgot about either. I think it would be a good idea to
take up this practice again. Regarding Clang: unless Astyle falls apart
using C++11 constructs that are going to occur more frequently in
future, I think there is little reason to depart from its use instead of
reverting to Clang.
--
David Kastrup
- automated formatting, Han-Wen Nienhuys, 2020/01/27
- Re: automated formatting, Werner LEMBERG, 2020/01/27
- Re: automated formatting, David Kastrup, 2020/01/27
- Re: automated formatting,
David Kastrup <=
- Re: automated formatting, Han-Wen Nienhuys, 2020/01/27
- Re: automated formatting, David Kastrup, 2020/01/27
- Re: automated formatting, David Kastrup, 2020/01/27
- Re: automated formatting, Han-Wen Nienhuys, 2020/01/28
- Re: automated formatting, Carl Sorensen, 2020/01/28
- Re: automated formatting, Dan Eble, 2020/01/28
- Re: automated formatting, David Kastrup, 2020/01/28
- Re: automated formatting, Han-Wen Nienhuys, 2020/01/30
- Re: automated formatting, Werner LEMBERG, 2020/01/30