[Libreoffice-commits] core.git: 7 commits - chart2/source extensions/source hwpfilter/source l10ntools/source sal/osl unoidl/source

Stephan Bergmann sbergman at redhat.com
Mon Aug 4 05:51:44 PDT 2014


On 08/01/2014 10:48 PM, Norbert Thiebaud wrote:
> On Thu, Jul 31, 2014 at 12:32 PM, Bjoern Michaelsen
> <bjoern.michaelsen at canonical.com> wrote:
>> Hi all,
>>
>> On Thu, Jul 31, 2014 at 11:59:42AM +0200, Stephan Bergmann wrote:
>>> Please refrain from such cosmetic changes in the future.  IIRC, the
>>> unoidl module (being mostly written by a single person, me)
>>> more-or-less consistently used a single formatting style until now.
>>> I see no good reason to change that to another formatting style.
>>
>> Before this explodes into a bikeshed, I tentatively agree with Stephan here,
>> despite me writing:
>>
>>   https://wiki.openoffice.org/wiki/Writer/Code_Conventions
>>
>> back in the days. Note that document wasnt build on what I assumed to be the
>> "right style"(*), but the most commonly used style in an attempt to bring more
>> consistency to the code base.
>>
>> I dont think drive-by reformatting to be a good way to solve this though
>
> Well damned if you do, damned it you don't.

Why are you damned if you don't?

> If I do that _with_ other modifications, people complain... if I do
> that stand-alone separated from other modifications people complain
> So should I do the reformatting to be able to read the code and make
> sure the other modification(s) make sens.. and then undo the
> formatting ?

I don't understand your problem.  Do you mean, you're unable to read 
code formatted as

> bool operator ==(ConstantValue const & lhs, ConstantValue const & rhs) {
>     if (lhs.type == rhs.type) {
>         switch (lhs.type) {

rather than as

> bool operator ==(ConstantValue const & lhs, ConstantValue const & rhs)
> {
>     if (lhs.type == rhs.type)
>     {
>         switch (lhs.type)
>         {

?

> Or should I just ignore anything that has to do with that dialect ?
> The issue is not 'written by one person', but read by many.

The parenthetical "being mostly written by a single person" was meant to 
clarify that it therefore uses consistent formatting throughout already. 
  It was not meant to imply that the code is readable only by one. 
(And, just to clarify, the somewhat redundant addition of ", me" was not 
meant to say "and now I'm angry" but rather "and that's why I noted this 
change in the first place.")

To make my point clear:  The costs of reformatting existing code IMO 
generally outweigh its benefits.  Even when done as a dedicated commit. 
  And especially so if a single file out of a coherent set of 
consistently formatted files is reformatted differently.

Stephan


More information about the LibreOffice mailing list