Big reformat of sources before unfreeze of master (was: Re: Schedule to switch back to master for feature development)

Jaroslaw Staniek staniek at kde.org
Mon Aug 31 10:13:38 BST 2015


On 31 August 2015 at 10:44, Dmitry Kazakov <dimula73 at gmail.com> wrote:
>
>
>> >> 2) I am personally against of automated whitespace reformatting,
>> >> because
>> >> it pollutes history of files without any use. Includes,
>> >> slots, forward declarations reformattings are ok. Whitespace no.
>> >
>> >
>> > There is a lot of use in whitespace cleanup: it makes the code
>> > consistent and readable.
>>
>> Yes, we discussed that a bit a while ago. Initially I was critical
>> too. But whitespace changes can be ignored when generating diff _and_
>> blame (the -w option). Anyone can add this flag in git options for
>> diff/blame. I'd do so.
>>
>> I'd like to note that we don't have a proven formatting tool for now
>> for all C++ elements. astyle got broken, and clang formatter can be
>> better but we need an expert. Missing things may be minor but we can't
>> make the result worse in problematic areas than the original. Not even
>> KF5 has a formatting tool, last I checked.
>
>
> Yes, the last time we discussed it, I raised quite a few issues with the
> formatter and got a response that "they are limitations of the formatter
and
> cannot be overcome easily". So why we should spend time on it at all if it
> doesn't solve any real issue? At least in Krita I don't see any real
problem
> with formatting. Yes, there are a few places where it is non-standard, but
> we fix it when refactoring these lines.

How about that:
​
​A kind of the same here.Personally ​I can live in kexi.git without
formatting and renames for some time, in this dept non-app repos like
kreport.git deserve renames first for basic consistency (there are classes
with no prefixes, Ko prefixes and KReport prefixes, all mixed now). Because
it's more like a 'public' code, headers are actually installed.
​
When kexi.git and krita.git and
​(​
​​
cut-off
​)​
calligra.git
​gets created, repo maintainers can decide with to do regarding formatting.
I hope it can wait. First we're
​ about to have some renames. Every calligra subproject has specific time
frames and workforce. Let's distribute the decision....


PS: Re-wrapping
​looks like the most intrusive change. git diff -w won't ignore it. Example:

*​Original: one line​*

​​
void FoobarClass::setFoobar(VeryLongType a1, VeryLongType a2,
​​
VeryLongType a3)

->
*Formatted: 2 lines​*
*​​*


void FoobarClass::setFoobar(VeryLongType a1, VeryLongType a2,
​                            ​
VeryLongType a3)

​--
regards, Jaroslaw Staniek

KDE:
: A world-wide network of software engineers, artists, writers, translators
: and facilitators committed to Free Software development - http://kde.org
Calligra Suite:
: A graphic art and office suite - http://calligra.org
Kexi:
: A visual database apps builder - http://calligra.org/kexi
Qt Certified Specialist:
: http://www.linkedin.com/in/jstaniek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20150831/fcbf89f6/attachment.htm>


More information about the calligra-devel mailing list